Skip to content

Commit

Permalink
fix: solve err Notification when setGroupInfo. (#2806)
Browse files Browse the repository at this point in the history
* fix: solve err Notification when setGroupInfo.

* build: update checkout version.

* fix: update notification contents.
  • Loading branch information
mo3et authored Oct 30, 2024
1 parent 07d30a6 commit 5af41e8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cleanup-after-milestone-prs-merged.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4.2.0

- name: Get the PR title and extract PR numbers
id: extract_pr_numbers
Expand Down
23 changes: 3 additions & 20 deletions config/notification.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,3 @@
# Copyright © 2023 OpenIM. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Determines if a message should be sent. If set to false, it triggers a silent sync without a message. If true, it requires triggering a conversation.
# For rpc notification, send twice: once as a message and once as a notification.
# The options field 'isNotification' indicates if it's a notification.
groupCreated:
isSendMsg: true
# Reliability level of the message sending.
Expand Down Expand Up @@ -309,9 +292,9 @@ userInfoUpdated:
unreadCount: false
offlinePush:
enable: true
title: Remove a blocked user
desc: Remove a blocked user
ext: Remove a blocked user
title: userInfo updated
desc: userInfo updated
ext: userInfo updated

userStatusChanged:
isSendMsg: false
Expand Down
5 changes: 3 additions & 2 deletions internal/rpc/group/group.go
Original file line number Diff line number Diff line change
Expand Up @@ -1026,7 +1026,7 @@ func (g *groupServer) SetGroupInfo(ctx context.Context, req *pbgroup.SetGroupInf
}
num := len(update)
if req.GroupInfoForSet.Notification != "" {
num--
num -= 3
func() {
conversation := &pbconversation.ConversationReq{
ConversationID: msgprocessor.GetConversationIDBySessionType(constant.ReadGroupChatType, req.GroupInfoForSet.GroupID),
Expand Down Expand Up @@ -1133,8 +1133,9 @@ func (g *groupServer) SetGroupInfoEx(ctx context.Context, req *pbgroup.SetGroupI
}

num := len(updatedData)

if req.Notification != nil {
num--
num -= 3

if req.Notification.Value != "" {
func() {
Expand Down

0 comments on commit 5af41e8

Please sign in to comment.