Fix infinite loop in presence handler

Fixes #5102
This commit is contained in:
Richard van der Hoff 2019-04-26 11:13:16 +01:00
parent ce6d47934b
commit bd0d45ca69
3 changed files with 24 additions and 0 deletions

View file

@ -828,6 +828,11 @@ class PresenceHandler(object):
if typ != EventTypes.Member:
continue
if event_id is None:
# state has been deleted, so this is not a join. We only care about
# joins.
continue
event = yield self.store.get_event(event_id)
if event.content.get("membership") != Membership.JOIN:
# We only care about joins