|
|
@ -1028,12 +1028,12 @@ func (g *groupServer) SetGroupInfo(ctx context.Context, req *pbgroup.SetGroupInf
|
|
|
|
}
|
|
|
|
}
|
|
|
|
resp, err := g.GetGroupMemberUserIDs(ctx, &pbgroup.GetGroupMemberUserIDsReq{GroupID: req.GroupInfoForSet.GroupID})
|
|
|
|
resp, err := g.GetGroupMemberUserIDs(ctx, &pbgroup.GetGroupMemberUserIDsReq{GroupID: req.GroupInfoForSet.GroupID})
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
log.ZWarn(ctx, "GetGroupMemberIDs", err)
|
|
|
|
log.ZWarn(ctx, "GetGroupMemberIDs is failed.", err)
|
|
|
|
return
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
conversation.GroupAtType = &wrapperspb.Int32Value{Value: constant.GroupNotification}
|
|
|
|
conversation.GroupAtType = &wrapperspb.Int32Value{Value: constant.GroupNotification}
|
|
|
|
if err := g.conversationRpcClient.SetConversations(ctx, resp.UserIDs, conversation); err != nil {
|
|
|
|
if err := g.conversationRpcClient.SetConversations(ctx, resp.UserIDs, conversation); err != nil {
|
|
|
|
log.ZWarn(ctx, "SetConversations", err, resp.UserIDs, conversation)
|
|
|
|
log.ZWarn(ctx, "SetConversations", err, "UserIDs", resp.UserIDs, "conversation", conversation)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
}()
|
|
|
|
g.notification.GroupInfoSetAnnouncementNotification(ctx, &sdkws.GroupInfoSetAnnouncementTips{Group: tips.Group, OpUser: tips.OpUser})
|
|
|
|
g.notification.GroupInfoSetAnnouncementNotification(ctx, &sdkws.GroupInfoSetAnnouncementTips{Group: tips.Group, OpUser: tips.OpUser})
|
|
|
@ -1125,6 +1125,7 @@ func (g *groupServer) SetGroupInfoEX(ctx context.Context, req *pbgroup.SetGroupI
|
|
|
|
if req.GroupInfoForSetEX.Notification != nil {
|
|
|
|
if req.GroupInfoForSetEX.Notification != nil {
|
|
|
|
num--
|
|
|
|
num--
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if req.GroupInfoForSetEX.Notification.Value != "" {
|
|
|
|
func() {
|
|
|
|
func() {
|
|
|
|
conversation := &pbconversation.ConversationReq{
|
|
|
|
conversation := &pbconversation.ConversationReq{
|
|
|
|
ConversationID: msgprocessor.GetConversationIDBySessionType(constant.ReadGroupChatType, req.GroupInfoForSetEX.GroupID),
|
|
|
|
ConversationID: msgprocessor.GetConversationIDBySessionType(constant.ReadGroupChatType, req.GroupInfoForSetEX.GroupID),
|
|
|
@ -1134,24 +1135,26 @@ func (g *groupServer) SetGroupInfoEX(ctx context.Context, req *pbgroup.SetGroupI
|
|
|
|
|
|
|
|
|
|
|
|
resp, err := g.GetGroupMemberUserIDs(ctx, &pbgroup.GetGroupMemberUserIDsReq{GroupID: req.GroupInfoForSetEX.GroupID})
|
|
|
|
resp, err := g.GetGroupMemberUserIDs(ctx, &pbgroup.GetGroupMemberUserIDsReq{GroupID: req.GroupInfoForSetEX.GroupID})
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
log.ZWarn(ctx, "GetGroupMemberIDs", err)
|
|
|
|
log.ZWarn(ctx, "GetGroupMemberIDs is failed.", err)
|
|
|
|
return
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
conversation.GroupAtType = &wrapperspb.Int32Value{Value: constant.GroupNotification}
|
|
|
|
conversation.GroupAtType = &wrapperspb.Int32Value{Value: constant.GroupNotification}
|
|
|
|
|
|
|
|
|
|
|
|
if err := g.conversationRpcClient.SetConversations(ctx, resp.UserIDs, conversation); err != nil {
|
|
|
|
if err := g.conversationRpcClient.SetConversations(ctx, resp.UserIDs, conversation); err != nil {
|
|
|
|
log.ZWarn(ctx, "SetConversations", err, resp.UserIDs, conversation)
|
|
|
|
log.ZWarn(ctx, "SetConversations", err, "UserIDs", resp.UserIDs, "conversation", conversation)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}()
|
|
|
|
}()
|
|
|
|
|
|
|
|
|
|
|
|
g.notification.GroupInfoSetAnnouncementNotification(ctx, &sdkws.GroupInfoSetAnnouncementTips{Group: tips.Group, OpUser: tips.OpUser})
|
|
|
|
g.notification.GroupInfoSetAnnouncementNotification(ctx, &sdkws.GroupInfoSetAnnouncementTips{Group: tips.Group, OpUser: tips.OpUser})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if req.GroupInfoForSetEX.GroupName != "" {
|
|
|
|
if req.GroupInfoForSetEX.GroupName != "" {
|
|
|
|
num--
|
|
|
|
num--
|
|
|
|
|
|
|
|
|
|
|
|
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 {
|
|
|
|
if num > 0 {
|
|
|
|
g.notification.GroupInfoSetNotification(ctx, tips)
|
|
|
|
g.notification.GroupInfoSetNotification(ctx, tips)
|
|
|
|
}
|
|
|
|
}
|
|
|
|