Skip to content

Commit

Permalink
Room member (#950)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
babolivier authored and richvdh committed Jul 14, 2017
1 parent e641897 commit 750d980
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 22 deletions.
8 changes: 5 additions & 3 deletions api/client-server/room_state.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,20 +56,22 @@ paths:
name: eventType
description: The type of event to send.
required: true
x-example: "m.room.name"
x-example: "m.room.member"
- in: path
type: string
name: stateKey
description: The state_key for the state to send. Defaults to the empty string.
required: true
x-example: ""
x-example: "@alice:example.com"
- in: body
name: body
schema:
type: object
example: |-
{
"name": "New name for the room"
"membership": "join",
"avatar_url": "mxc://localhost/SEsfnsuifSDFSSEF#auto",
"displayname": "Alice Margatroid"
}
responses:
200:
Expand Down
3 changes: 3 additions & 0 deletions changelogs/client_server.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@

- 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``
(`#362 <https://github.com/matrix-org/matrix-doc/pull/362>`_).
- Clarify the fields which are applicable to different types of push rule
Expand Down
16 changes: 0 additions & 16 deletions event-schemas/examples/m.room.member
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,6 @@
"avatar_url": "mxc://localhost/SEsfnsuifSDFSSEF#auto",
"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",
"origin_server_ts": 1431961217939,
"event_id": "$WLGTSEFSEF:localhost",
Expand Down
2 changes: 1 addition & 1 deletion event-schemas/examples/m.room.member#invite_room_state
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"age": 242352,
"content": {
"membership": "join",
"membership": "invite",
"avatar_url": "mxc://localhost/SEsfnsuifSDFSSEF#auto",
"displayname": "Alice Margatroid"
},
Expand Down
4 changes: 2 additions & 2 deletions specification/client_server_api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
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,
to update the ``displayname`` and ``avatar_url``.
- a ``m.room.member`` event (with a ``join`` membership) is sent to every room
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
values of the ``displayname`` and ``avatar_url`` keys, in addition to the
required ``presence`` key containing the current presence state of the user.
Expand Down

0 comments on commit 750d980

Please sign in to comment.