-
Notifications
You must be signed in to change notification settings - Fork 191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement server-wide open group user bans and unbans. #2653
base: unstable
Are you sure you want to change the base?
Conversation
This will be very useful, so definitely want to merge, but a few things i think we need to update before this
Thanks |
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.
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).
PySOGS has always had support for server bans, but Session did not call that endpoint until now.
I agree. |
I should note that #2639 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. |
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@2c8e4f1. 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.
This expands on oxen-io#2653 and ensures that when a user is banned from a room or an entire server, and **Delete All** has been selected, not just his messages but also his emoji reactions will be removed. This pull-request depends on oxen-io/session-pysogs#169. Verified working on `sog.caliban.org`.
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. |
This expands on oxen-io#2653 and ensures that when a user is banned from a room or an entire server, and **Delete All** has been selected, not just his messages but also his emoji reactions will be removed. This pull-request depends on oxen-io/session-pysogs#169. Verified working on `sog.caliban.org`.
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@2c8e4f1.
This has been tested with Session 1.10.4 in combination with
open.getsession.org
andsog.caliban.org
, both of which have been updated to support server-wide banning.Contributor checklist:
clearnet
branchyarn ready
run passes successfully (more about tests here)