From 6c0be3f2af15674f5ae34b250714293b497adac0 Mon Sep 17 00:00:00 2001 From: withchao <48119764+withchao@users.noreply.github.com> Date: Fri, 22 Sep 2023 19:31:44 +0800 Subject: [PATCH] fix: turn on status notification that will burn after reading (#1115) * fix: repeated modification session notification * fix: repeated modification session notification * fix: jpush return a nil pointer panic * fix: push redis pkg * fix: OANotification * feat: add rpc GetConversationNeedOfflinePushUserIDs * update pkg * cicd: robot automated Change * offlinePushMsg * conversation * conversation * cicd: robot automated Change * conversation * cicd: robot automated Change * conversation * url 2 im s3 * url 2 im s3 * cicd: robot automated Change * url 2 im s3 * s3 public read * cicd: robot automated Change * s3 public read * cicd: robot automated Change * s3 public read * s3 public read * s3 public read * s3 public read * s3 public read * cicd: robot automated Change * s3 public read * s3 public read * fix: SendMsg api * config scripts * config scripts * fix: SetConversations * fix: SetConversations --------- Co-authored-by: withchao --- internal/rpc/conversation/conversaion.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/internal/rpc/conversation/conversaion.go b/internal/rpc/conversation/conversaion.go index 4b5b43fe8..e76f83008 100644 --- a/internal/rpc/conversation/conversaion.go +++ b/internal/rpc/conversation/conversaion.go @@ -204,10 +204,8 @@ func (c *conversationServer) SetConversations(ctx context.Context, req *pbconver if err := c.conversationDatabase.SyncPeerUserPrivateConversationTx(ctx, conversations); err != nil { return nil, err } - if len(req.UserIDs) != 1 || unequal > 0 { - for _, userID := range req.UserIDs { - c.conversationNotificationSender.ConversationSetPrivateNotification(ctx, userID, req.Conversation.UserID, req.Conversation.IsPrivateChat.Value, req.Conversation.ConversationID) - } + for _, userID := range req.UserIDs { + c.conversationNotificationSender.ConversationSetPrivateNotification(ctx, userID, req.Conversation.UserID, req.Conversation.IsPrivateChat.Value, req.Conversation.ConversationID) } } if req.Conversation.BurnDuration != nil { @@ -219,7 +217,7 @@ func (c *conversationServer) SetConversations(ctx context.Context, req *pbconver if err := c.conversationDatabase.SetUsersConversationFiledTx(ctx, req.UserIDs, &conversation, m); err != nil { return nil, err } - if len(req.UserIDs) != 1 || unequal > 0 { + if unequal > 0 { for _, v := range req.UserIDs { c.conversationNotificationSender.ConversationChangeNotification(ctx, v, []string{req.Conversation.ConversationID}) }