synapse-product/synapse
Brendan Abolivier 708cef88cf
Discard retention policies when retrieving state
Purge jobs don't delete the latest event in a room in order to keep the forward extremity and not break the room. On the other hand, get_state_events, when given an at_token argument calls filter_events_for_client to know if the user can see the event that matches that (sync) token. That function uses the retention policies of the events it's given to filter out those that are too old from a client's view.

Some clients, such as Riot, when loading a room, request the list of members for the latest sync token it knows about, and get confused to the point of refusing to send any message if the server tells it that it can't get that information. This can happen very easily with the message retention feature turned on and a room with low activity so that the last event sent becomes too old according to the room's retention policy.

An easy and clean fix for that issue is to discard the room's retention policies when retrieving state.
2019-11-28 19:26:26 +00:00
..
_scripts Replace instance variations of homeserver with correct case/spacing 2019-11-12 13:08:12 +00:00
api Merge branch 'develop' into babolivier/message_retention 2019-11-26 17:53:57 +00:00
app Merge branch 'master' into develop 2019-11-26 14:15:30 +00:00
appservice Clean up newline quote marks around the codebase (#6362) 2019-11-21 12:00:14 +00:00
config Clarifications for the email configuration settings. (#6423) 2019-11-28 09:29:18 +00:00
crypto Don't encode object as UTF-8 string if not needed. 2019-10-24 18:08:45 +01:00
events Merge branch 'develop' into babolivier/message_retention 2019-11-26 17:53:57 +00:00
federation Implementation of MSC2314 (#6176) 2019-11-28 08:54:07 +11:00
groups Remove usage of deprecated logger.warn method from codebase (#6271) 2019-10-31 10:23:24 +00:00
handlers Discard retention policies when retrieving state 2019-11-28 19:26:26 +00:00
http Clean up newline quote marks around the codebase (#6362) 2019-11-21 12:00:14 +00:00
logging Improve the performance of structured logging (#6322) 2019-11-26 03:45:50 +11:00
metrics Fix up some typechecking (#6150) 2019-10-02 05:29:01 -07:00
module_api Remove unnecessary parentheses around return statements (#5931) 2019-08-30 16:28:26 +01:00
push Clean up newline quote marks around the codebase (#6362) 2019-11-21 12:00:14 +00:00
replication Prevent account_data content from being sent over TCP replication (#6333) 2019-11-26 13:58:39 +00:00
res/templates Allow HS to send emails when adding an email to the HS (#6042) 2019-09-20 15:21:30 +01:00
rest add etag and count to key backup endpoints (#5858) 2019-11-27 16:14:44 -05:00
server_notices Clean up newline quote marks around the codebase (#6362) 2019-11-21 12:00:14 +00:00
spam_checker_api Expose some homeserver functionality to spam checkers (#6259) 2019-10-31 09:16:14 -06:00
state Fix bug which caused rejected events to be stored with the wrong room state (#6320) 2019-11-06 10:01:39 +00:00
static Fix SSO fallback login 2019-09-12 11:42:47 +01:00
storage Remove local threepids on account deactivation (#6426) 2019-11-28 10:40:42 +00:00
streams Clean up newline quote marks around the codebase (#6362) 2019-11-21 12:00:14 +00:00
util Replace instance variations of homeserver with correct case/spacing 2019-11-12 13:08:12 +00:00
__init__.py 1.6.0 2019-11-26 13:28:40 +00:00
event_auth.py Remove usage of deprecated logger.warn method from codebase (#6271) 2019-10-31 10:23:24 +00:00
notifier.py Port to use state storage 2019-10-30 14:46:54 +00:00
python_dependencies.py Remove the psutil dependency (#6318) 2019-11-05 05:05:48 +11:00
secrets.py Run Black. (#5482) 2019-06-20 19:32:02 +10:00
server.py Fix startup error when http proxy is defined. (#6421) 2019-11-26 18:10:50 +00:00
server.pyi Support for routing outbound HTTP requests via a proxy (#6239) 2019-11-01 14:07:44 +00:00
types.py Merge branch 'develop' into uhoreg/e2e_cross-signing_merged 2019-10-18 11:39:40 +01:00
visibility.py Discard retention policies when retrieving state 2019-11-28 19:26:26 +00:00