summary refs log tree commit diff
path: root/scripts-dev/tail-synapse.py (unfollow)
Commit message (Collapse)AuthorFilesLines
2020-10-14Remember mappings when we bind a 3pid using the internal sydent bind API (#66)Andrew Morgan3-0/+16
https://github.com/matrix-org/synapse-dinsic/pull/51 added an option that would automatically bind a user's threepid to a configured identity server after they had registered. Unfortunately, when you bind threepids, ideally you would store that mapping in the database so that later on you can remove those mappings when you deactivate an account. We found that due the fact that we did not store these mappings, threepids were not unbound upon user account deactivation. This PR fixes the issue by creating the mappings again, meaning they will again be removed upon account deactivation.
2020-10-13"Freeze" a room when the last admin of that room leaves (#59)Andrew Morgan3-4/+302
If the last admin of a room departs, and thus the room no longer has any admins within it, we "freeze" the room. Freezing a room means that the power level required to do anything in the room (sending messages, inviting others etc) will require power level 100. At the moment, an admin can come back and unfreeze the room manually. The plan is to eventually make unfreezing of the room automatic on admin rejoin, though that will be in a separate PR. This *could* work in mainline, however if the admin who leaves is on a homeserver without this functionality, then the room isn't frozen. I imagine this would probably be pretty confusing to people. Part of this feature was allowing Synapse modules to send events, which has been implemented in mainline at https://github.com/matrix-org/synapse/pull/8479, and cherry-picked to the `dinsic` fork in 62c7b10. The actual freezing logic has been implemented here in the RoomAccessRules module.
2020-10-12Allow modules to create and send events into rooms (#8479)Andrew Morgan7-89/+299
This PR allows Synapse modules making use of the `ModuleApi` to create and send non-membership events into a room. This can useful to have modules send messages, or change power levels in a room etc. Note that they must send event through a user that's already in the room. The non-membership event limitation is currently arbitrary, as it's another chunk of work and not necessary at the moment. This commit has been cherry-picked from mainline.
2020-09-29Only assert valid next_link params when provided (#65)Andrew Morgan2-6/+10
Bug introduced in https://github.com/matrix-org/synapse-dinsic/commit/ff91a451b We were checking whether the `nextLink` param was valid, even if it wasn't provided. In that case, `nextLink` was `None`, which would clearly not be a valid URL. This would prevent password reset and other operations if `nextLink` was not provided and the `next_link_domain_whitelist` config option was in use.
2020-09-18Don't push if an user account has expired (#58)Mathieu Velten4-5/+40
2020-09-18Swap method calls in RoomAccessTestCase.test_change_rules (#64)Andrew Morgan2-5/+7
Swap these calls around, as the check for changing `restricted` to `unrestricted` will actually change `self.restricted_room` to an unrestricted room. Do that last, instead of first. Additionally add a comment with a warning.
2020-09-18Make all rooms noisy by default (#60)Mathieu Velten3-8/+17
2020-09-18Make AccessRules use the public rooms directory instead of checking a room's ↵Andrew Morgan10-116/+579
join rules on rule change (#63) This PR switches several conditions regarding room access rules to check against the status of the room's inclusion in the public room list instead of its join rules. The code includes a snapshot of https://github.com/matrix-org/synapse/pull/8292, which will likely change in time and need merging in again.
2020-09-11Override the power levels defaults, enforce mod requirement for invites, ↵Andrew Morgan3-7/+119
admin requirements for unknown state events (#61) This PR modifies the `RoomAccessRules` module, an implementation of `ThirdPartyEventRules`, to both: * Modify the default power levels when creating a room to set: - `invite` to be minimum PL50 - `state_default` to be minimum PL100 * Enforce this when creating the room.
2020-09-10RoomAccessRules cleanup (#62)Andrew Morgan3-149/+210
Various cleanups of the DINUM-specific `RoomAccessRules` module, including: * Type hints * Docstring cleanups * Some code cleanups
2020-09-09Add a config option for validating 'next_link' parameters against a domain ↵Andrew Morgan5-18/+218
whitelist (#8275) This is a config option ported over from DINUM's Sydent: https://github.com/matrix-org/sydent/pull/285 They've switched to validating 3PIDs via Synapse rather than Sydent, and would like to retain this functionality. This original purpose for this change is phishing prevention. This solution could also potent