diff options
author | Erik Johnston <erik@matrix.org> | 2014-09-01 18:21:29 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2014-09-01 18:21:29 +0100 |
commit | 3faa2ae78c7ce2330ed7699ffe3fd08306055da9 (patch) | |
tree | e97b09a70586b58cdc9f2533dae1d071167b4b71 /synapse/rest/presence.py | |
parent | Add beginnings of ban support. (diff) | |
parent | Follow API renaming. state -> presence. mtime_ago -> last_active_ago (diff) | |
download | synapse-3faa2ae78c7ce2330ed7699ffe3fd08306055da9.tar.xz |
Merge branch 'develop' of github.com:matrix-org/synapse into room_config
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") |