转移群组时判断是否已经是群主

This commit is contained in:
heavyrian2012
2026-03-25 10:01:15 +08:00
parent 3eef24bdb9
commit dc5687319a
@@ -2437,6 +2437,10 @@ public class MemoryMessagesStore implements IMessagesStore {
return ErrorCode.ERROR_CODE_NOT_RIGHT; return ErrorCode.ERROR_CODE_NOT_RIGHT;
} }
if(newOwner.equals(groupInfo.getOwner())) {
return ErrorCode.ERROR_CODE_SUCCESS;
}
//check the new owner is in member list? is that necessary? //check the new owner is in member list? is that necessary?
MultiMap<String, WFCMessage.GroupMember> groupMembers = hzInstance.getMultiMap(GROUP_MEMBERS); MultiMap<String, WFCMessage.GroupMember> groupMembers = hzInstance.getMultiMap(GROUP_MEMBERS);
Collection<WFCMessage.GroupMember> members = groupMembers.get(groupId); Collection<WFCMessage.GroupMember> members = groupMembers.get(groupId);