diff options
author | Erik Johnston <erik@matrix.org> | 2016-11-16 17:34:44 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2016-11-16 17:34:44 +0000 |
commit | ed787cf09edd77e39ad9da0b957359214de85287 (patch) | |
tree | befff8fe0284099e1e2df9eccd729ff1eedd4727 /synapse/storage/presence.py | |
parent | Add initial cut of federation send queue (diff) | |
download | synapse-ed787cf09edd77e39ad9da0b957359214de85287.tar.xz |
Hook up the send queue and create a federation sender worker
Diffstat (limited to '')
-rw-r--r-- | synapse/storage/presence.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/synapse/storage/presence.py b/synapse/storage/presence.py index 21d0696640..7460f98a1f 100644 --- a/synapse/storage/presence.py +++ b/synapse/storage/presence.py @@ -37,6 +37,13 @@ class UserPresenceState(namedtuple("UserPresenceState", status_msg (str): User set status message. """ + def as_dict(self): + return dict(self._asdict()) + + @staticmethod + def from_dict(d): + return UserPresenceState(**d) + def copy_and_replace(self, **kwargs): return self._replace(**kwargs) |