From 6e08f66ba7e8b70507e4d4e1366e965c7b1dfc65 Mon Sep 17 00:00:00 2001 From: withchao <993506633@qq.com> Date: Mon, 29 May 2023 20:20:44 +0800 Subject: [PATCH 1/3] RevokeMsg --- internal/rpc/msg/revoke.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/rpc/msg/revoke.go b/internal/rpc/msg/revoke.go index 3e1b64ff6..3bfb200c9 100644 --- a/internal/rpc/msg/revoke.go +++ b/internal/rpc/msg/revoke.go @@ -96,7 +96,7 @@ func (m *msgServer) RevokeMsg(ctx context.Context, req *msg.RevokeMsgReq) (*msg. } else { 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 &msg.RevokeMsgResp{}, nil From 576b699495d253b64c0b96271e87d17fda8da18d Mon Sep 17 00:00:00 2001 From: withchao <993506633@qq.com> Date: Mon, 29 May 2023 20:23:50 +0800 Subject: [PATCH 2/3] NotificationWithSesstionType --- pkg/rpcclient/msg.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/rpcclient/msg.go b/pkg/rpcclient/msg.go index d89779171..2ed76ff60 100644 --- a/pkg/rpcclient/msg.go +++ b/pkg/rpcclient/msg.go @@ -176,7 +176,7 @@ func (s *NotificationSender) NotificationWithSesstionType(ctx context.Context, s msg.Content = content msg.MsgFrom = constant.SysMsgType msg.ContentType = contentType - msg.SessionType = s.sessionTypeConf[contentType] + msg.SessionType = sesstionType if msg.SessionType == constant.SuperGroupChatType { msg.GroupID = recvID } From d446516be8b89578114cbd81f31d0847208570b3 Mon Sep 17 00:00:00 2001 From: withchao <993506633@qq.com> Date: Mon, 29 May 2023 20:33:36 +0800 Subject: [PATCH 3/3] findMsgInfoBySeq --- pkg/common/db/controller/msg.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/common/db/controller/msg.go b/pkg/common/db/controller/msg.go index d779c81b2..0072f4280 100644 --- a/pkg/common/db/controller/msg.go +++ b/pkg/common/db/controller/msg.go @@ -407,7 +407,7 @@ func (db *commonMsgDatabase) findMsgInfoBySeq(ctx context.Context, userID, docID } else { for _, seq := range seqs { for i, msg := range msgs { - if seq == msg.Msg.Seq { + if msg.Msg != nil && seq == msg.Msg.Seq { break } if i == len(msgs)-1 {