Room member (#950)

* Fixed an incorrect membership on example
* Added precision on membership upon profile update
* Changed first example into a join
* Changed the state/{eventType}/{stateKey} example with an actual state key
pull/977/head
Brendan Abolivier 7 years ago committed by Richard van der Hoff
parent e641897d88
commit 750d980bc0

@ -56,20 +56,22 @@ paths:
name: eventType name: eventType
description: The type of event to send. description: The type of event to send.
required: true required: true
x-example: "m.room.name" x-example: "m.room.member"
- in: path - in: path
type: string type: string
name: stateKey name: stateKey
description: The state_key for the state to send. Defaults to the empty string. description: The state_key for the state to send. Defaults to the empty string.
required: true required: true
x-example: "" x-example: "@alice:example.com"
- in: body - in: body
name: body name: body
schema: schema:
type: object type: object
example: |- example: |-
{ {
"name": "New name for the room" "membership": "join",
"avatar_url": "mxc://localhost/SEsfnsuifSDFSSEF#auto",
"displayname": "Alice Margatroid"
} }
responses: responses:
200: 200:

@ -51,6 +51,9 @@
- Spec clarifications: - Spec clarifications:
- Fixed examples of ``m.room.member`` event and room state change,
and added a clarification on the membership event sent upon profile update
(`#950 <https://github.com/matrix-org/matrix-doc/pull/950>`_).
- Spell out the way that state is handled by ``POST /createRoom`` - Spell out the way that state is handled by ``POST /createRoom``
(`#362 <https://github.com/matrix-org/matrix-doc/pull/362>`_). (`#362 <https://github.com/matrix-org/matrix-doc/pull/362>`_).
- Clarify the fields which are applicable to different types of push rule - Clarify the fields which are applicable to different types of push rule

@ -5,22 +5,6 @@
"avatar_url": "mxc://localhost/SEsfnsuifSDFSSEF#auto", "avatar_url": "mxc://localhost/SEsfnsuifSDFSSEF#auto",
"displayname": "Alice Margatroid" "displayname": "Alice Margatroid"
}, },
"invite_room_state": [
{
"type": "m.room.name",
"state_key": "",
"content": {
"name": "Forest of Magic"
}
},
{
"type": "m.room.join_rules",
"state_key": "",
"content": {
"join_rules": "invite"
}
}
],
"state_key": "@alice:localhost", "state_key": "@alice:localhost",
"origin_server_ts": 1431961217939, "origin_server_ts": 1431961217939,
"event_id": "$WLGTSEFSEF:localhost", "event_id": "$WLGTSEFSEF:localhost",

@ -1,7 +1,7 @@
{ {
"age": 242352, "age": 242352,
"content": { "content": {
"membership": "join", "membership": "invite",
"avatar_url": "mxc://localhost/SEsfnsuifSDFSSEF#auto", "avatar_url": "mxc://localhost/SEsfnsuifSDFSSEF#auto",
"displayname": "Alice Margatroid" "displayname": "Alice Margatroid"
}, },

@ -1341,8 +1341,8 @@ many places of a client's display, changes to these fields cause an automatic
propagation event to occur, informing likely-interested parties of the new propagation event to occur, informing likely-interested parties of the new
values. This change is conveyed using two separate mechanisms: values. This change is conveyed using two separate mechanisms:
- a ``m.room.member`` event is sent to every room the user is a member of, - a ``m.room.member`` event (with a ``join`` membership) is sent to every room
to update the ``displayname`` and ``avatar_url``. the user is a member of, to update the ``displayname`` and ``avatar_url``.
- a ``m.presence`` presence status update is sent, again containing the new - a ``m.presence`` presence status update is sent, again containing the new
values of the ``displayname`` and ``avatar_url`` keys, in addition to the values of the ``displayname`` and ``avatar_url`` keys, in addition to the
required ``presence`` key containing the current presence state of the user. required ``presence`` key containing the current presence state of the user.

Loading…
Cancel
Save