summary refs log tree commit diff
path: root/synapse/visibility.py (follow)
Commit message (Collapse)AuthorAgeFilesLines
* LintBrendan Abolivier2019-11-281-4/+8
|
* Discard retention policies when retrieving stateBrendan Abolivier2019-11-281-8/+14
| | | | | | | | 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.
* Don't apply retention policy based filtering on state eventsBrendan Abolivier2019-11-061-6/+9
| | | | As per MSC1763, 'Retention is only considered for non-state events.', so don't filter out state events based on the room's retention policy.
* Implement per-room message retention policiesBrendan Abolivier2019-11-041-0/+17
|
* Port to use state storageErik Johnston2019-10-301-13/+17
|
* Replace returnValue with return (#5736)Amber Brown2019-07-231-4/+4
|
* Run Black. (#5482)Amber Brown2019-06-201-41/+28
|
* Implement soft failErik Johnston2019-03-061-0/+4
|
* clarify commentsErik Johnston2019-03-051-1/+1
|
* Fix missing null guardErik Johnston2019-03-041-1/+1
|
* Only check history visibility when filteringErik Johnston2019-03-041-34/+43
| | | | | | When filtering events to send to server we check more than just history visibility. However when deciding whether to backfill or not we only care about the history visibility.
* Stop backpaginating when events not visibleErik Johnston2019-02-201-5/+25
|
* Refactor state group lookup to reduce DB hits (#4011)Erik Johnston2018-10-251-6/+9
| | | | | | | | Currently when fetching state groups from the data store we make two hits two the database: once for members and once for non-members (unless request is filtered to one or the other). This adds needless load to the datbase, so this PR refactors the lookup to make only a single database hit.
* synapse/visibility.py: fix SyntaxError on py3.7Ivan Shapovalov2018-10-141-1/+1
|
* Optimisation for filter_events_for_serverRichard van der Hoff2018-10-081-7/+6
| | | | | | | We're better off hashing just the event_id than the whole ((type, state_key), event_id) tuple - so use a dict instead of a set. Also, iteritems > items.
* Merge remote-tracking branch 'origin/develop' into rav/remove_who_forgot_in_roomRichard van der Hoff2018-07-231-9/+10
|\
| * Make the rest of the .iterwhatever go away (#3562)Amber Brown2018-07-211-9/+10
| |
* | Remove redundant checks on room forgottennessRichard van der Hoff2018-07-231-18/+1
|/ | | | Fixes #3550
* add a commentRichard van der Hoff2018-07-171-0/+2
|
* Fix visibility of events from erased users over federationRichard van der Hoff2018-07-171-56/+67
|
* fix importsRichard van der Hoff2018-07-171-0/+1
|
* add a commentRichard van der Hoff2018-07-171-0/+2
|
* Attempt to make _filter_events_for_server more efficientRichard van der Hoff2018-07-161-17/+23
|
* Move filter_events_for_server out of FederationHandlerRichard van der Hoff2018-07-161-0/+132
| | | | for easier unit testing.
* run isortAmber Brown2018-07-091-3/+1
|
* Revert "Revert "Merge pull request #3431 from ↵Erik Johnston2018-06-251-22/+55
| | | | | | matrix-org/rav/erasure_visibility"" This reverts commit 1d009013b3c3e814177afc59f066e02a202b21cd.
* Revert "Merge pull request #3431 from matrix-org/rav/erasure_visibility"Richard van der Hoff2018-06-221-55/+22
| | | | | This reverts commit ce0d911156b355c5bf452120bfb08653dad96497, reversing changes made to b4a5d767a94f1680d07edfd583aae54ce422573e.
* Filter out erased messagesRichard van der Hoff2018-06-121-22/+55
| | | | Redact any messges sent by erased users.
* remove dead filter_events_for_clientsRichard van der Hoff2018-06-121-64/+34
| | | | | | This is only used by filter_events_for_client, so we can simplify the whole thing by just doing one user at a time, and removing a dead storage function to boot.
* Remove preserve_context_over_{fn, deferred}Richard van der Hoff2017-11-141-2/+2
| | | | | Both of these functions ae known to leak logcontexts. Replace the remaining calls to them and kill them off.
* Don't filter out current state events from timelineErik Johnston2017-09-181-3/+11
|
* Perf: Don't filter events for pushErik Johnston2017-07-071-19/+0
| | | | | We know the users are joined and we can explicitly check for if they are ignoring the user, so lets do that.
* Revert "Speed up filtering of a single event in push"Erik Johnston2017-05-081-0/+19
| | | | This reverts commit 421fdf74609439edaaffce117436e6a6df147841.
* Speed up filtering of a single event in pushErik Johnston2017-04-281-19/+0
|
* Don't convert to deferreds when not necessaryErik Johnston2017-03-301-1/+2
|
* Fix rejection of invites not reaching syncDavid Baker2017-03-231-0/+7
| | | | | | | Always allow the user to see their own leave events, otherwise they won't see the event if they reject an invite for a room whose history visibility is set such that they cannot see events before joining.
* Replace context.current_state with context.current_state_idsErik Johnston2016-08-251-0/+19
|
* Preserve some logcontextsErik Johnston2016-08-241-3/+3
|
* move filter_events_for_client out of base handlerMark Haines2016-05-111-0/+210