mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-07 10:35:59 +08:00
fix: after modifying the avatar, offline users who joined the group did not synchronize (#1198)
* feat: v2 to v3 data conversion * feat: v2 to v3 data conversion * fix: CallbackBeforeCreateGroup * fix: NotificationUserInfoUpdate * fix: NotificationUserInfoUpdate * chore: update pkg github.com/OpenIMSDK/protocol v0.0.26 * chore: code format * update pkg
This commit is contained in:
@@ -121,14 +121,23 @@ func (s *groupServer) NotificationUserInfoUpdate(ctx context.Context, req *pbgro
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
groupIDs := make([]string, 0, len(members))
|
||||
for _, member := range members {
|
||||
if member.Nickname != "" && member.FaceURL != "" {
|
||||
continue
|
||||
}
|
||||
if err := s.Notification.GroupMemberInfoSetNotification(ctx, member.GroupID, member.UserID); err != nil {
|
||||
log.ZError(ctx, "setGroupMemberInfo notification failed", err, "member", member.UserID, "groupID", member.GroupID)
|
||||
groupIDs = append(groupIDs, member.GroupID)
|
||||
}
|
||||
log.ZInfo(ctx, "NotificationUserInfoUpdate", "joinGroupNum", len(members), "updateNum", len(groupIDs), "updateGroupIDs", groupIDs)
|
||||
for _, groupID := range groupIDs {
|
||||
if err := s.Notification.GroupMemberInfoSetNotification(ctx, groupID, req.UserID); err != nil {
|
||||
log.ZError(ctx, "NotificationUserInfoUpdate setGroupMemberInfo notification failed", err, "groupID", groupID)
|
||||
}
|
||||
}
|
||||
if err := s.GroupDatabase.DeleteGroupMemberHash(ctx, groupIDs); err != nil {
|
||||
log.ZError(ctx, "NotificationUserInfoUpdate DeleteGroupMemberHash", err, "groupID", groupIDs)
|
||||
}
|
||||
|
||||
return &pbgroup.NotificationUserInfoUpdateResp{}, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user