I’m looking for the best way to clear a group but keep its banned user list using the api. I’d prefer not to do it on behalf of any user, I am only looking to clean up a group.
Currently it looks like I’d need to do one of the following:
- Get the banned users on behalf of a user with: https://api-us.cometchat.io/v2.0/users/onBehalfOfUID/groups/guid/bannedusers/
- Delete the group
- Recreate the group using the same guid
- Individually add each of the previously banned users to the group
- Individually ban each user again
- Individually remove all users on behalf of a user with: https://prodocs.cometchat.com/reference#user-leavegroup
- possibly get the list of banned users first and make sure they are excluded from the list in the step above.
Am I missing a better way? Is there something like the flush option for tokens with an option to keep banned members?