Rearrange persist_event so that do all the queries that need to be done before returning early if we have already persisted that event.

This commit is contained in:
Erik Johnston 2015-02-04 10:16:51 +00:00
parent 02be8da5e1
commit c0462dbf15
3 changed files with 77 additions and 72 deletions

View file

@ -77,7 +77,7 @@ class EventBase(object):
return self.content["membership"]
def is_state(self):
return hasattr(self, "state_key")
return hasattr(self, "state_key") and self.state_key is not None
def get_dict(self):
d = dict(self._event_dict)