Merge pull request #1137 from turt2live/travis/m.presence

Make m.presence match what synapse returns
pull/1139/head^2
Richard van der Hoff 7 years ago committed by GitHub
commit 66f434c680
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -19,6 +19,8 @@ Unreleased changes
(`#1106 <https://github.com/matrix-org/matrix-doc/pull/1106>`_). (`#1106 <https://github.com/matrix-org/matrix-doc/pull/1106>`_).
- Clarify default values for some fields on the /search API - Clarify default values for some fields on the /search API
(`#1109 <https://github.com/matrix-org/matrix-doc/pull/1109>`_). (`#1109 <https://github.com/matrix-org/matrix-doc/pull/1109>`_).
- Fix the representation of ``m.presence`` events
(`#1137 <https://github.com/matrix-org/matrix-doc/pull/1137>`_).
- Changes to the API which will be backwards-compatible for clients: - Changes to the API which will be backwards-compatible for clients:

@ -4,8 +4,7 @@
"last_active_ago": 2478593, "last_active_ago": 2478593,
"presence": "online", "presence": "online",
"currently_active": false, "currently_active": false,
"user_id": "@example:localhost"
}, },
"event_id": "$WLGTSEFSEF:localhost", "sender": "@example:localhost",
"type": "m.presence" "type": "m.presence"
} }

@ -29,21 +29,17 @@
"currently_active": { "currently_active": {
"type": boolean, "type": boolean,
"description": "Whether the user is currently active" "description": "Whether the user is currently active"
},
"user_id": {
"type": "string",
"description": "The user's ID."
} }
}, },
"required": ["presence", "user_id"] "required": ["presence"]
}, },
"type": { "type": {
"type": "string", "type": "string",
"enum": ["m.presence"] "enum": ["m.presence"]
}, },
"event_id": { "sender": {
"type": "string" "type": "string"
} }
}, },
"required": ["event_id", "type", "content"] "required": ["sender", "type", "content"]
} }

Loading…
Cancel
Save