diff options
author | Kegan Dougal <kegan@matrix.org> | 2014-09-03 11:45:30 +0100 |
---|---|---|
committer | Kegan Dougal <kegan@matrix.org> | 2014-09-03 11:45:30 +0100 |
commit | c54d8df5040140c95b8ca31ce2ac023379f8cfdc (patch) | |
tree | b4ebcaf6d6189fe45b49f23f00618f6972e7aa11 | |
parent | Fixed /presence APIs to urldecode user IDs. (diff) | |
download | synapse-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-presence | 2 | ||||
-rw-r--r-- | synapse/handlers/presence.py | 2 |
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 |