Merge branch 'errcode' of github.com:OpenIMSDK/Open-IM-Server into errcode

This commit is contained in:
wangchuxiao 2023-05-30 11:18:12 +08:00
commit 2663c60850
3 changed files with 3 additions and 3 deletions

View File

@ -96,7 +96,7 @@ func (m *msgServer) RevokeMsg(ctx context.Context, req *msg.RevokeMsgReq) (*msg.
} else { } else {
recvID = msgs[0].RecvID recvID = msgs[0].RecvID
} }
if err := m.notificationSender.Notification(ctx, req.UserID, recvID, constant.MsgRevokeNotification, &tips, utils.WithSendMsg(false), utils.WithHistory(true), utils.WithPersistent()); err != nil { if err := m.notificationSender.NotificationWithSesstionType(ctx, req.UserID, recvID, constant.MsgRevokeNotification, msgs[0].SessionType, &tips); err != nil {
return nil, err return nil, err
} }
return &msg.RevokeMsgResp{}, nil return &msg.RevokeMsgResp{}, nil

View File

@ -407,7 +407,7 @@ func (db *commonMsgDatabase) findMsgInfoBySeq(ctx context.Context, userID, docID
} else { } else {
for _, seq := range seqs { for _, seq := range seqs {
for i, msg := range msgs { for i, msg := range msgs {
if seq == msg.Msg.Seq { if msg.Msg != nil && seq == msg.Msg.Seq {
break break
} }
if i == len(msgs)-1 { if i == len(msgs)-1 {

View File

@ -176,7 +176,7 @@ func (s *NotificationSender) NotificationWithSesstionType(ctx context.Context, s
msg.Content = content msg.Content = content
msg.MsgFrom = constant.SysMsgType msg.MsgFrom = constant.SysMsgType
msg.ContentType = contentType msg.ContentType = contentType
msg.SessionType = s.sessionTypeConf[contentType] msg.SessionType = sesstionType
if msg.SessionType == constant.SuperGroupChatType { if msg.SessionType == constant.SuperGroupChatType {
msg.GroupID = recvID msg.GroupID = recvID
} }