From 02f4e3b3ff613a6e9024c0fef416be0bf92bf48f Mon Sep 17 00:00:00 2001 From: "Paul \"LeoNerd\" Evans" Date: Mon, 1 Sep 2014 14:45:35 +0100 Subject: Rename 'state' presence key to the much more obvious 'presence'; maintain a legacy 'state' copy for now --- synapse/rest/presence.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'synapse/rest/presence.py') 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") -- cgit 1.4.1