summary refs log tree commit diff
path: root/synapse/rest/presence.py
diff options
context:
space:
mode:
authorPaul "LeoNerd" Evans <paul@matrix.org>2014-09-01 14:45:35 +0100
committerPaul "LeoNerd" Evans <paul@matrix.org>2014-09-01 14:45:41 +0100
commit02f4e3b3ff613a6e9024c0fef416be0bf92bf48f (patch)
treed3f165d0a69df79b10851a82d87f2615b183f196 /synapse/rest/presence.py
parentFleshed out joining/leaving rooms. Added M_LIMIT_EXCEEDED standard error code... (diff)
downloadsynapse-02f4e3b3ff613a6e9024c0fef416be0bf92bf48f.tar.xz
Rename 'state' presence key to the much more obvious 'presence'; maintain a legacy 'state' copy for now
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")