diff options
author | Mark Haines <mark.haines@matrix.org> | 2014-09-01 15:51:44 +0100 |
---|---|---|
committer | Mark Haines <mark.haines@matrix.org> | 2014-09-01 15:51:44 +0100 |
commit | f5755bcadfe6d27f1449f85f8b846ca4b02e5f20 (patch) | |
tree | bfb9f36038c0728de5411059f3af97a4be473509 /synapse/rest/presence.py | |
parent | Fix homeserver config parsing (diff) | |
parent | Rename API-visible 'mtime' presence field to 'last_active'; slightly differen... (diff) | |
download | synapse-f5755bcadfe6d27f1449f85f8b846ca4b02e5f20.tar.xz |
Merge branch 'develop' into server2server_tls
Diffstat (limited to 'synapse/rest/presence.py')
-rw-r--r-- | synapse/rest/presence.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/synapse/rest/presence.py b/synapse/rest/presence.py index e013b20853..bce3943542 100644 --- a/synapse/rest/presence.py +++ b/synapse/rest/presence.py @@ -48,7 +48,11 @@ class PresenceStatusRestServlet(RestServlet): try: content = json.loads(request.content.read()) - state["state"] = content.pop("state") + # Legacy handling + if "state" in content: + state["presence"] = content.pop("state") + else: + state["presence"] = content.pop("presence") if "status_msg" in content: state["status_msg"] = content.pop("status_msg") |