From ae2bb794527149f1ae77869ef288723ed36d46e7 Mon Sep 17 00:00:00 2001 From: luhaoling <2198702716@qq.com> Date: Fri, 19 Jan 2024 17:08:34 +0800 Subject: [PATCH] fix: fix the CallbackSingleMsgRead unused --- internal/rpc/msg/as_read.go | 11 +++++++++++ pkg/callbackstruct/message.go | 7 ++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/internal/rpc/msg/as_read.go b/internal/rpc/msg/as_read.go index 71e038b39..e91e2cf34 100644 --- a/internal/rpc/msg/as_read.go +++ b/internal/rpc/msg/as_read.go @@ -124,6 +124,17 @@ func (m *msgServer) MarkMsgsAsRead( return } } + + req_callback := &cbapi.CallbackSingleMsgReadReq{ + ConversationID: conversation.ConversationID, + UserID: req.UserID, + Seqs: req.Seqs, + ContentType: conversation.ConversationType, + } + if err = CallbackSingleMsgRead(ctx, req_callback); err != nil { + return nil, err + } + if err = m.sendMarkAsReadNotification(ctx, req.ConversationID, conversation.ConversationType, req.UserID, m.conversationAndGetRecvID(conversation, req.UserID), req.Seqs, hasReadSeq); err != nil { return diff --git a/pkg/callbackstruct/message.go b/pkg/callbackstruct/message.go index ae36d7139..2864e28b1 100644 --- a/pkg/callbackstruct/message.go +++ b/pkg/callbackstruct/message.go @@ -94,9 +94,10 @@ type CallbackGroupMsgReadResp struct { type CallbackSingleMsgReadReq struct { CallbackCommand `json:"callbackCommand"` - SendID string `json:"sendID"` - ReceiveID string `json:"receiveID"` - ContentType int64 `json:"contentType"` + ConversationID string `json:"conversationID"` + UserID string `json:"userID"` + Seqs []int64 `json:"Seqs"` + ContentType int32 `json:"contentType"` } type CallbackSingleMsgReadResp struct {