diff options
author | Richard van der Hoff <richard@matrix.org> | 2019-06-05 16:32:35 +0100 |
---|---|---|
committer | Richard van der Hoff <richard@matrix.org> | 2019-06-05 16:32:35 +0100 |
commit | 7603a706eb96305d804da05030a71288fcc255ab (patch) | |
tree | d59bcc7827bc6b038d5c3e7bc46677a84007e255 /synapse/handlers/presence.py | |
parent | Update sample config (diff) | |
parent | Fix `federation_custom_ca_list` configuration option. (diff) | |
download | synapse-7603a706eb96305d804da05030a71288fcc255ab.tar.xz |
Merge branch 'rav/fix_custom_ca' into rav/enable_tls_verification
Diffstat (limited to 'synapse/handlers/presence.py')
-rw-r--r-- | synapse/handlers/presence.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/synapse/handlers/presence.py b/synapse/handlers/presence.py index 6209858bbb..e49c8203ef 100644 --- a/synapse/handlers/presence.py +++ b/synapse/handlers/presence.py @@ -828,14 +828,17 @@ class PresenceHandler(object): # joins. continue - event = yield self.store.get_event(event_id) - if event.content.get("membership") != Membership.JOIN: + event = yield self.store.get_event(event_id, allow_none=True) + if not event or event.content.get("membership") != Membership.JOIN: # We only care about joins continue if prev_event_id: - prev_event = yield self.store.get_event(prev_event_id) - if prev_event.content.get("membership") == Membership.JOIN: + prev_event = yield self.store.get_event(prev_event_id, allow_none=True) + if ( + prev_event + and prev_event.content.get("membership") == Membership.JOIN + ): # Ignore changes to join events. continue |