RevokeMsg

This commit is contained in:
withchao
2023-05-23 17:11:56 +08:00
parent 9e7bc1b769
commit 5061047164
9 changed files with 854 additions and 692 deletions
+2 -6
View File
@@ -134,13 +134,9 @@ func (m *MsgClient) PullMessageBySeqList(ctx context.Context, req *sdkws.PullMes
return resp, err
}
type NotificationElem struct {
Detail string `json:"detail,omitempty"`
}
func (c *MsgClient) Notification(ctx context.Context, sendID, recvID string, contentType int32, m proto.Message, opts ...utils.OptionsOpt) error {
n := NotificationElem{Detail: utils.StructToJsonString(m)}
content, err := json.Marshal(n)
n := sdkws.NotificationElem{Detail: utils.StructToJsonString(m)}
content, err := json.Marshal(&n)
if err != nil {
log.ZError(ctx, "MsgClient Notification json.Marshal failed", err, "sendID", sendID, "recvID", recvID, "contentType", contentType, "msg", m)
return err