summary refs log tree commit diff
diff options
context:
space:
mode:
authorKegan Dougal <kegan@matrix.org>2014-09-03 11:45:30 +0100
committerKegan Dougal <kegan@matrix.org>2014-09-03 11:45:30 +0100
commitc54d8df5040140c95b8ca31ce2ac023379f8cfdc (patch)
treeb4ebcaf6d6189fe45b49f23f00618f6972e7aa11
parentFixed /presence APIs to urldecode user IDs. (diff)
downloadsynapse-c54d8df5040140c95b8ca31ce2ac023379f8cfdc.tar.xz
Update API docs to use 'presence' key not 'state'. Fixed error messages when setting presence.
-rw-r--r--docs/client-server/swagger_matrix/api-docs-presence2
-rw-r--r--synapse/handlers/presence.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/docs/client-server/swagger_matrix/api-docs-presence b/docs/client-server/swagger_matrix/api-docs-presence
index 99630d2056..5c9f160508 100644
--- a/docs/client-server/swagger_matrix/api-docs-presence
+++ b/docs/client-server/swagger_matrix/api-docs-presence
@@ -106,7 +106,7 @@
     "PresenceUpdate": {
       "id": "PresenceUpdate",
       "properties": {
-        "state": {
+        "presence": {
           "type": "string",
           "description": "Enum: The presence state.",
           "enum": [
diff --git a/synapse/handlers/presence.py b/synapse/handlers/presence.py
index 48549b03e5..beb5aa3a6a 100644
--- a/synapse/handlers/presence.py
+++ b/synapse/handlers/presence.py
@@ -207,7 +207,7 @@ class PresenceHandler(BaseHandler):
             raise SynapseError(400, "User is not hosted on this Home Server")
 
         if target_user != auth_user:
-            raise AuthError(400, "Cannot set another user's displayname")
+            raise AuthError(400, "Cannot set another user's presence")
 
         if "status_msg" not in state:
             state["status_msg"] = None