Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spec unsigned.membership property, per MSC4115 #1847

Merged
merged 5 commits into from
Jun 10, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelogs/client_server/newsfragments/1847.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add the new `unsigned.membership` property to events served over the client-server API, as per [MSC4115](https://github.com/matrix-org/matrix-spec-proposals/pull/4115).
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ properties:
"origin_server_ts": 1632491098485,
"unsigned": {
"age": 1257,
"membership": "leave"
}
}
transaction_id:
Expand All @@ -112,3 +113,23 @@ properties:
this.
title: EventContent
type: object
membership:
description: |
The room membership of the user making the request, at the time of the event.

This property is the value of the `membership` property of the
requesting user's [`m.room.member`](/client-server-api#mroommember)
state at the point of the event, including any changes caused by the
event. If the user had yet to join the room at the time of the event
(i.e, they have no `m.room.member` state), this property is set to
`leave`.

It is recommended that homeservers SHOULD populate this property
richvdh marked this conversation as resolved.
Show resolved Hide resolved
wherever practical, but they MAY omit it if necessary (for example,
if calculating the value is expensive, servers might choose to only
implement it in encrypted rooms). The property is *not* normally populated
in events pushed to application services via the application service transaction API
(where there is no clear definition of "requesting user").
type: string
example: join
x-addedInMatrixVersion: "1.11"
3 changes: 2 additions & 1 deletion data/event-schemas/examples/core/room_event.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"sender": "@example:example.org",
"origin_server_ts": 1432735824653,
"unsigned": {
"age": 1234
"age": 1234,
"membership": "join"
}
}