synapse/changelog.d
Brendan Abolivier d73bf18d13
Server notices: Dissociate room creation/lookup from invite (#7199)
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.
2020-04-04 17:27:45 +02:00
..
.gitignore Correct attrs package name in requirements (#3492) 2018-07-07 10:46:59 +10:00
6446.misc Add some benchmarks for LruCache (#6446) 2020-04-03 16:31:52 +01:00
6573.bugfix Don't default to an invalid sqlite config if no database configuration is provided (#6573) 2020-03-26 17:13:14 +00:00
6634.bugfix Fix CAS redirect url (#6634) 2020-03-24 11:59:04 +00:00
6639.bugfix Fill in the 'default' field for user-defined push rules (#6639) 2020-03-31 15:08:56 +01:00
6892.doc update debian installation instructions to recommend installing virtualenv instead of python3-virtualenv (#6892) 2020-03-27 15:02:00 +00:00
6946.bugfix Transfer alias mappings when joining an upgraded room (#6946) 2020-03-30 17:53:25 +01:00
6988.doc Improve database configuration docs (#6988) 2020-03-20 15:24:22 +00:00
7006.feature Extend web_client_location to handle absolute URLs (#7006) 2020-04-03 11:57:34 -04:00
7009.feature Set Referrer-Policy to no-referrer for media (#7009) 2020-03-23 09:48:28 +00:00
7010.misc Newsfile 2020-02-28 11:27:37 +00:00
7011.misc Remove concept of a non-limited stream. (#7011) 2020-03-20 14:40:47 +00:00
7024.misc Move catchup of replication streams to worker. (#7024) 2020-03-25 14:54:01 +00:00
7051.feature Admin API to join users to a room. (#7051) 2020-03-27 19:16:43 +00:00
7068.bugfix Validate that the session is not modified during UI-Auth (#7068) 2020-03-26 07:39:34 -04:00
7089.bugfix Fix a bug in the federation API which could cause occasional "Failed to get PDU" errors (#7089). 2020-03-19 08:22:56 -04:00
7096.feature Add options to prevent users from changing their profile. (#7096) 2020-03-27 19:15:23 +00:00
7102.feature Support SAML in the user interactive authentication workflow. (#7102) 2020-04-01 08:48:00 -04:00
7107.doc Update pre-built package name for FreeBSD (#7107). (#7107) 2020-03-23 15:31:02 +00:00
7109.bugfix Use the proper error code when a canonical alias that does not exist is used. (#7109) 2020-03-23 15:21:54 -04:00
7110.misc Convert some of the media REST code to async/await (#7110) 2020-03-20 07:20:02 -04:00
7115.misc Clean-up some auth/login REST code (#7115) 2020-03-20 16:22:47 -04:00
7116.misc Convert *StreamRow classes to inner classes (#7116) 2020-03-23 13:59:11 +00:00
7117.bugfix Fix processing of groups stream, and use symbolic names for streams (#7117) 2020-03-23 11:39:36 +00:00
7118.feature Allow server admins to define and enforce a password policy (MSC2000). (#7118) 2020-03-26 16:51:13 +00:00
7119.doc Update postgres.md (#7119) 2020-04-01 12:44:51 +01:00
7120.misc Clean up some LoggingContext stuff (#7120) 2020-03-24 14:45:33 +00:00
7128.misc Remove usage of "conn_id" for presence. (#7128) 2020-03-30 16:37:24 +01:00
7133.bugfix Newsfile 2020-03-24 10:36:44 +00:00
7136.misc Refactor the CAS code (move the logic out of the REST layer to a handler) (#7136) 2020-03-26 15:05:26 -04:00
7137.removal Remove unused captcha_bypass_secret option (#7137) 2020-03-25 17:49:34 +00:00
7141.doc Various cleanups to INSTALL.md (#7141) 2020-03-25 13:56:40 +00:00
7147.doc Add developer documentation for running a local CAS server (#7147) 2020-03-30 07:28:42 -04:00
7150.bugfix Ensure is_verified on /_matrix/client/r0/room_keys/keys is a boolean (#7150) 2020-03-27 13:30:22 +00:00
7151.bugfix Update changelog.d/7151.bugfix 2020-03-26 20:35:50 +02:00
7152.feature Improve the UX of the login fallback when using SSO (#7152) 2020-03-27 20:19:54 +00:00
7153.feature Always whitelist the login fallback for SSO (#7153) 2020-03-27 20:24:52 +00:00
7155.bugfix Only import sqlite3 when type checking (#7155) 2020-03-27 13:20:00 +00:00
7157.misc Add tests for outbound device pokes 2020-03-27 12:01:37 +00:00
7158.misc Fix device list update stream ids going backward (#7158) 2020-04-03 10:40:22 +01:00
7159.bugfix Rewrite prune_old_outbound_device_pokes for efficiency (#7159) 2020-03-30 19:06:52 +01:00
7160.feature changelog 2020-03-27 12:30:59 +00:00
7167.doc Improve TURN documentation. (#7167) 2020-03-31 15:50:48 +01:00
7171.doc Fix a small typo in the metrics_flags config option. (#7171) 2020-03-30 17:38:21 +01:00
7177.bugfix Only setdefault for signatures if device has key_json (#7177) 2020-03-31 14:51:22 +01:00
7178.bugfix Fix a bug which could cause incorrect 'cyclic dependency' error. (#7178) 2020-03-31 13:09:16 +01:00
7181.misc Fix "'NoneType' has no attribute start|stop" logcontext errors (#7181) 2020-03-31 15:18:41 +01:00
7183.misc Reduce the number of calls to resource.getrusage (#7183) 2020-04-03 13:21:30 +01:00
7184.misc Fix use of async/await in media code (#7184) 2020-03-31 09:33:02 -04:00
7186.feature Support CAS in UI Auth flows. (#7186) 2020-04-03 15:35:05 -04:00
7188.misc Convert http.HTTPStatus objects to their int equivalent (#7188) 2020-04-03 14:26:07 +01:00
7190.misc changelog 2020-03-31 17:44:36 +01:00
7191.feature Allow admins to create aliases when they are not in the room (#7191) 2020-04-01 08:27:05 -04:00
7195.misc Remove connections per replication stream metric. (#7195) 2020-04-01 10:40:46 +01:00
7199.bugfix Server notices: Dissociate room creation/lookup from invite (#7199) 2020-04-04 17:27:45 +02:00
7203.bugfix Remove some run_in_background calls in replication code (#7203) 2020-04-03 12:29:30 +01:00