mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-07 10:35:59 +08:00
Refactor code
This commit is contained in:
@@ -210,6 +210,19 @@ func GetJoinedGroupIDListByUserID(userID string) ([]string, error) {
|
||||
return groupIDList, nil
|
||||
}
|
||||
|
||||
func IsGroupOwnerAdmin(groupID, UserID string) bool {
|
||||
groupMemberList, err := GetOwnerManagerByGroupID(groupID)
|
||||
if err != nil {
|
||||
return false
|
||||
}
|
||||
for _, v := range groupMemberList {
|
||||
if v.UserID == UserID && v.RoleLevel > constant.GroupOrdinaryUsers {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
//
|
||||
//func SelectGroupList(groupID string) ([]string, error) {
|
||||
// var groupUserID string
|
||||
|
||||
Reference in New Issue
Block a user