summary refs log tree commit diff
path: root/synapse/rest/presence.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-09-01 18:21:29 +0100
committerErik Johnston <erik@matrix.org>2014-09-01 18:21:29 +0100
commit3faa2ae78c7ce2330ed7699ffe3fd08306055da9 (patch)
treee97b09a70586b58cdc9f2533dae1d071167b4b71 /synapse/rest/presence.py
parentAdd beginnings of ban support. (diff)
parentFollow API renaming. state -> presence. mtime_ago -> last_active_ago (diff)
downloadsynapse-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.py6
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")