Implement server-wide open group user bans and unbans.
This adds to Session the ability to ban a user not just from a single group, but from an entire SOGS.
To successfully ban (or unban) a user across a whole server, the executor must be a global moderator of the SOGS instance.
When banning a user, the global moderator may opt to also remove all of the user's messages from the server. This requires PySOGS > 0.3.7 to allow the simultaneous deletion of messages from multiple groups. See oxen-io/session-pysogs@2c8e4f1535bbd2cc676fa46914c691d2332cb41f.
This has been tested with Session 1.10.4 in combination with open.getsession.org and sog.caliban.org, both of which have been updated to support server-wide banning.

Contributor checklist:
- [x] My commits are in nice logical chunks with good commit messages
- [x] My changes are rebased on the latest
clearnetbranch - [x] A
yarn readyrun passes successfully (more about tests here) - [x] My changes are ready to be shipped to users
This will be very useful, so definitely want to merge, but a few things i think we need to update before this
- Currently on Session Desktop i don't think we are identifying global moderators or admins, which means we wont know who to show this option to, if we show it to regular admins or mods the banning will fail.
- We will need to push an update on the SOGS side to allow arbitrary SOGS operators to support this functionality.
- I think we might need to put this behind the SOGS capabilities endpoint, so that in the client we don't display this function if its not supported on the SOGS we are connected to?
- We should support these options on other platforms (not required to merge, but we should do)
Thanks
- Currently on Session Desktop i don't think we are identifying global moderators or admins, which means we wont know who to show this option to, if we show it to regular admins or mods the banning will fail.
Yes, desktop makes no distinction between global and local superusers. Nor does it even distinguish between moderators and admins, which is a problem in itself, because server operators looking to use the client to create moderators for their groups instead create admins with too much power.
You are correct that banning will fail when the moderator or admin does not have global scope, but this failure is at least reported, albeit it not specifically.
- We will need to push an update on the SOGS side to allow arbitrary SOGS operators to support this functionality.
Server-wide bans are already supported by SOGS.
The SOGS code to enable cross-group message deletion has already been submitted and merged, and will presumably make it into the 0.3.8 release (or whichever is the next version released).
- I think we might need to put this behind the SOGS capabilities endpoint, so that in the client we don't display this function if its not supported on the SOGS we are connected to?
PySOGS has always had support for server bans, but Session did not call that endpoint until now.
- We should support these options on other platforms (not required to merge, but we should do)
I agree.
I should note that oxen-io/session-desktop-temp#283 also applies to this PR. When the moderator/admin chooses to Delete All, the target user's messages are removed but any emoji reactions placed by him are not.
I've added code that will also remove a user's emoji reactions when clearing up following a ban.
That part of the code is still pending a PR to PySOGS, namely oxen-io/session-pysogs#169.