mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-19 00:09:02 +08:00
feat: add callback func (#1480)
* feat:add callback func * fix: fix the error * fix: fix the error of repalce * fix: fix the error of repalce
This commit is contained in:
@@ -16,6 +16,7 @@ package msg
|
||||
|
||||
import (
|
||||
"context"
|
||||
cbapi "github.com/openimsdk/open-im-server/v3/pkg/callbackstruct"
|
||||
|
||||
utils2 "github.com/OpenIMSDK/tools/utils"
|
||||
|
||||
@@ -164,6 +165,15 @@ func (m *msgServer) updateReadStatus(ctx context.Context, req *msg.MarkConversat
|
||||
return err
|
||||
}
|
||||
}
|
||||
reqCall := &cbapi.CallbackGroupMsgReadReq{
|
||||
SendID: conversation.OwnerUserID,
|
||||
ReceiveID: req.UserID,
|
||||
UnreadMsgNum: req.HasReadSeq,
|
||||
ContentType: int64(conversation.ConversationType),
|
||||
}
|
||||
if err := CallbackGroupMsgRead(ctx, reqCall); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if req.HasReadSeq > hasReadSeq {
|
||||
if err := m.MsgDatabase.SetHasReadSeq(ctx, req.UserID, req.ConversationID, req.HasReadSeq); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user