|
|
@ -1086,6 +1086,11 @@ func (g *groupServer) SetGroupInfoEx(ctx context.Context, req *pbgroup.SetGroupI
|
|
|
|
return nil, err
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// if Notification only contains spaces, set it to empty string
|
|
|
|
|
|
|
|
if strings.TrimSpace(req.Notification.Value) == "" {
|
|
|
|
|
|
|
|
req.Notification.Value = ""
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
updatedData, err := UpdateGroupInfoExMap(ctx, req)
|
|
|
|
updatedData, err := UpdateGroupInfoExMap(ctx, req)
|
|
|
|
if len(updatedData) == 0 {
|
|
|
|
if len(updatedData) == 0 {
|
|
|
|
return &pbgroup.SetGroupInfoExResp{}, nil
|
|
|
|
return &pbgroup.SetGroupInfoExResp{}, nil
|
|
|
@ -1114,12 +1119,13 @@ func (g *groupServer) SetGroupInfoEx(ctx context.Context, req *pbgroup.SetGroupI
|
|
|
|
tips.OpUser = g.groupMemberDB2PB(opMember, 0)
|
|
|
|
tips.OpUser = g.groupMemberDB2PB(opMember, 0)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// num is len of updatedData, use for the different type of notification
|
|
|
|
num := len(updatedData)
|
|
|
|
num := len(updatedData)
|
|
|
|
|
|
|
|
|
|
|
|
if req.Notification != nil {
|
|
|
|
if req.Notification != nil {
|
|
|
|
|
|
|
|
if req.Notification.Value != "" {
|
|
|
|
num -= 3
|
|
|
|
num -= 3
|
|
|
|
|
|
|
|
|
|
|
|
if req.Notification.Value != "" {
|
|
|
|
|
|
|
|
func() {
|
|
|
|
func() {
|
|
|
|
conversation := &pbconv.ConversationReq{
|
|
|
|
conversation := &pbconv.ConversationReq{
|
|
|
|
ConversationID: msgprocessor.GetConversationIDBySessionType(constant.ReadGroupChatType, req.GroupID),
|
|
|
|
ConversationID: msgprocessor.GetConversationIDBySessionType(constant.ReadGroupChatType, req.GroupID),
|
|
|
@ -1148,6 +1154,7 @@ func (g *groupServer) SetGroupInfoEx(ctx context.Context, req *pbgroup.SetGroupI
|
|
|
|
g.notification.GroupInfoSetNameNotification(ctx, &sdkws.GroupInfoSetNameTips{Group: tips.Group, OpUser: tips.OpUser})
|
|
|
|
g.notification.GroupInfoSetNameNotification(ctx, &sdkws.GroupInfoSetNameTips{Group: tips.Group, OpUser: tips.OpUser})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// if num > 0, send the normal notification
|
|
|
|
if num > 0 {
|
|
|
|
if num > 0 {
|
|
|
|
g.notification.GroupInfoSetNotification(ctx, tips)
|
|
|
|
g.notification.GroupInfoSetNotification(ctx, tips)
|
|
|
|
}
|
|
|
|
}
|
|
|
|