summary refs log tree commit diff
path: root/synapse/server_notices/server_notices_manager.py (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Fix some comments and types in service notices (#7996)Patrick Cloke2020-07-311-13/+16
|
* Add ability to wait for replication streams (#7542)Erik Johnston2020-05-221-3/+3
| | | | | | | The idea here is that if an instance persists an event via the replication HTTP API it can return before we receive that event over replication, which can lead to races where code assumes that persisting an event immediately updates various caches (e.g. current state of the room). Most of Synapse doesn't hit such races, so we don't do the waiting automagically, instead we do so where necessary to avoid unnecessary delays. We may decide to change our minds here if it turns out there are a lot of subtle races going on. People probably want to look at this commit by commit.
* async/await is_server_admin (#7363)Andrew Morgan2020-05-011-18/+14
|
* Server notices: Dissociate room creation/lookup from invite (#7199)Brendan Abolivier2020-04-041-9/+42
| | | | | | | | | Fixes #6815 Before figuring out whether we should alert a user on MAU, we call get_notice_room_for_user to get some info on the existing server notices room for this user. This function, if the room doesn't exist, creates it and invites the user in it. This means that, if we decide later that no server notice is needed, the user gets invited in a room with no message in it. This happens at every restart of the server, since the room ID returned by get_notice_room_for_user is cached. This PR fixes that by moving the inviting bit to a dedicated function, that's only called when the server actually needs to send a notice to the user. A potential issue with this approach is that the room that's created by get_notice_room_for_user doesn't match how that same function looks for an existing room (i.e. it creates a room that doesn't have an invite or a join for the current user in it, so it could lead to a new room being created each time a user syncs), but I'm not sure this is a problem given it's cached until the server restarts, so that function won't run very often. It also renames get_notice_room_for_user into get_or_create_notice_room_for_user to make what it does clearer.
* Add `local_current_membership` table (#6655)Erik Johnston2020-01-151-1/+1
| | | | | | | Currently we rely on `current_state_events` to figure out what rooms a user was in and their last membership event in there. However, if the server leaves the room then the table may be cleaned up and that information is lost. So lets add a table that separately holds that information.
* Replace returnValue with return (#5736)Amber Brown2019-07-231-3/+3
|
* Run Black. (#5482)Amber Brown2019-06-201-18/+12
|
* Ensure we wake up /sync when we add tag to notice roomErik Johnston2018-08-241-1/+7
|
* Make content of tag an empty object rather than nullErik Johnston2018-08-241-1/+1
|
* refactor for readability, and reuse caching for setting tagsNeil Johnson2018-08-161-1/+5
|
* fix case where empty string state check is evaulated as FalseNeil Johnson2018-08-161-1/+2
|
* wip cut at sending resource server noticesNeil Johnson2018-08-151-10/+20
|
* backout ability to pass in event type to server noticesNeil Johnson2018-08-141-2/+2
|
* support server notice state events for resource limitsNeil Johnson2018-08-141-2/+2
|
* Allow overriding the server_notices user's avatarRichard van der Hoff2018-05-231-3/+14
| | | | probably should have done this in the first place, like @turt2live suggested.
* fix typoRichard van der Hoff2018-05-231-1/+1
|
* Block attempts to send server notices to remote usersRichard van der Hoff2018-05-231-0/+4
|
* Better docstringsRichard van der Hoff2018-05-181-0/+16
|
* Make sure we reject attempts to invite the notices userRichard van der Hoff2018-05-181-0/+5
|
* Infrastructure for a server notices roomRichard van der Hoff2018-05-171-0/+110
Server Notices use a special room which the user can't dismiss. They are created on demand when some other bit of the code calls send_notice. (This doesn't actually do much yet becuse we don't call send_notice anywhere)