mirror of
				https://github.com/openimsdk/open-im-server.git
				synced 2025-10-26 21:22:16 +08:00 
			
		
		
		
	fix: invitation to join group notification opuser is null (#2562)
* fix: GroupApplicationAcceptedNotification * fix: GroupApplicationAcceptedNotification * fix: NotificationUserInfoUpdate * cicd: robot automated Change * fix: component * fix: getConversationInfo * feat: cron task * feat: cron task * feat: cron task * feat: cron task * feat: cron task * fix: minio config url recognition error * update gomake version * update gomake version * fix: seq conversion bug * fix: redis pipe exec * fix: ImportFriends * fix: A large number of logs keysAndValues length is not even * feat: mark read aggregate write * feat: online status supports redis cluster * feat: online status supports redis cluster * feat: online status supports redis cluster * merge * merge * read seq is written to mongo * read seq is written to mongo * fix: invitation to join group notification --------- Co-authored-by: withchao <withchao@users.noreply.github.com>
This commit is contained in:
		
							parent
							
								
									85614da36f
								
							
						
					
					
						commit
						bcd5324b48
					
				| @ -535,7 +535,28 @@ func (g *GroupNotificationSender) MemberEnterNotification(ctx context.Context, g | |||||||
| 	if err := g.conversationRpcClient.GroupChatFirstCreateConversation(ctx, groupID, entrantUserID); err != nil { | 	if err := g.conversationRpcClient.GroupChatFirstCreateConversation(ctx, groupID, entrantUserID); err != nil { | ||||||
| 		return err | 		return err | ||||||
| 	} | 	} | ||||||
| 
 | 	opUserID := mcontext.GetOpUserID(ctx) | ||||||
|  | 	var opUser *sdkws.GroupMemberFullInfo | ||||||
|  | 	if authverify.IsAppManagerUid(ctx, g.config.Share.IMAdminUserID) { | ||||||
|  | 		opUser = &sdkws.GroupMemberFullInfo{ | ||||||
|  | 			GroupID:        groupID, | ||||||
|  | 			UserID:         opUserID, | ||||||
|  | 			AppMangerLevel: constant.AppAdmin, | ||||||
|  | 		} | ||||||
|  | 	} else { | ||||||
|  | 		users, err := g.getGroupMembers(ctx, groupID, []string{opUserID}) | ||||||
|  | 		if err != nil { | ||||||
|  | 			return err | ||||||
|  | 		} | ||||||
|  | 		if len(users) == 0 { | ||||||
|  | 			opUser = &sdkws.GroupMemberFullInfo{ | ||||||
|  | 				GroupID: groupID, | ||||||
|  | 				UserID:  opUserID, | ||||||
|  | 			} | ||||||
|  | 		} else { | ||||||
|  | 			opUser = users[0] | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
| 	var group *sdkws.GroupInfo | 	var group *sdkws.GroupInfo | ||||||
| 	group, err = g.getGroupInfo(ctx, groupID) | 	group, err = g.getGroupInfo(ctx, groupID) | ||||||
| 	if err != nil { | 	if err != nil { | ||||||
| @ -545,7 +566,7 @@ func (g *GroupNotificationSender) MemberEnterNotification(ctx context.Context, g | |||||||
| 	if err != nil { | 	if err != nil { | ||||||
| 		return err | 		return err | ||||||
| 	} | 	} | ||||||
| 	tips := &sdkws.MemberInvitedTips{Group: group, InvitedUserList: users} | 	tips := &sdkws.MemberInvitedTips{Group: group, InvitedUserList: users, OpUser: opUser} | ||||||
| 	g.setVersion(ctx, &tips.GroupMemberVersion, &tips.GroupMemberVersionID, database.GroupMemberVersionName, tips.Group.GroupID) | 	g.setVersion(ctx, &tips.GroupMemberVersion, &tips.GroupMemberVersionID, database.GroupMemberVersionName, tips.Group.GroupID) | ||||||
| 	g.Notification(ctx, mcontext.GetOpUserID(ctx), group.GroupID, constant.MemberInvitedNotification, tips) | 	g.Notification(ctx, mcontext.GetOpUserID(ctx), group.GroupID, constant.MemberInvitedNotification, tips) | ||||||
| 	return nil | 	return nil | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user