Limit the number of members invited to join the group

This commit is contained in:
skiffer-git
2022-07-13 14:28:49 +08:00
parent d4e575f777
commit 58f4ebe411
4 changed files with 13 additions and 3 deletions
+3 -1
View File
@@ -232,6 +232,9 @@ func GroupCreatedNotification(operationID, opUserID, groupID string, initMemberL
continue
}
GroupCreatedTips.MemberList = append(GroupCreatedTips.MemberList, &groupMemberInfo)
if len(GroupCreatedTips.MemberList) == constant.MaxNotificationNum {
break
}
}
groupNotification(constant.GroupCreatedNotification, &GroupCreatedTips, opUserID, groupID, "", operationID)
}
@@ -536,7 +539,6 @@ func MemberInvitedNotification(operationID, groupID, opUserID, reason string, in
}
MemberInvitedTips.InvitedUserList = append(MemberInvitedTips.InvitedUserList, &groupMemberInfo)
}
groupNotification(constant.MemberInvitedNotification, &MemberInvitedTips, opUserID, groupID, "", operationID)
}