-
Notifications
You must be signed in to change notification settings - Fork 433
Spec lazy-loading room members #2035
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
Merged
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
e7ed8a2
Move lazy loading filter options to event filter
turt2live d56df32
Generalize wording to fit /messages and /sync
turt2live 34d6c1f
Clarify wording further for how to handle redundant members
turt2live b67161c
List the endpoints which are lazy-loading aware
turt2live ba520df
Move lazy loading to a section in Filtering
turt2live 7b266b3
Add membership params
turt2live b3d86f9
Add room summary spec
turt2live 8330810
Specify the new room naming scheme
turt2live b1dccda
changelog
turt2live 3ade2a9
List the endpoints which support LL
turt2live 551806a
Add a reference to the filtering module to /sync
turt2live c5fdd5c
Change note style
turt2live afead2e
Clarify LL in /sync a bit more
turt2live 77c4c4b
Add general clarity
turt2live a0e8201
Apply suggestions from code review
turt2live e4339fd
More clarity
turt2live a38af20
Apply suggestions from code review
turt2live 0506d09
incorporate LL review from matthew
ara4n 56e1640
Merge pull request #2106 from matrix-org/matthew/1.0/msc688-msc1227-l…
turt2live File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -34,6 +34,20 @@ paths: | |
| Clients use this API when they first log in to get an initial snapshot | ||
| of the state on the server, and then continue to call this API to get | ||
| incremental deltas to the state, and to receive new messages. | ||
|
|
||
| *Note*: This endpoint supports lazy-loading. See `Filtering <#filtering>`_ | ||
| for more information. Lazy-loading members is only supported on a ``StateFilter`` | ||
| for this endpoint. When lazy-loading is enabled, servers MUST include the | ||
| syncing user's own membership event when they join a room, or when the | ||
| full state of rooms is requested, to aid discovering the user's avatar & | ||
| displayname. | ||
|
|
||
| Like other members, the user's own membership event is eligible | ||
| for being considered redundant by the server. When a sync is ``limited``, | ||
| the server MUST return membership events for events in the gap | ||
| (between ``since`` and the start of the returned timeline), regardless | ||
| as to whether or not they are redundant. This ensures that joins/leaves | ||
| and profile changes which occur during the gap are not lost. | ||
| operationId: sync | ||
| security: | ||
| - accessToken: [] | ||
|
|
@@ -49,6 +63,8 @@ paths: | |
| requests. Creating a filter using the filter API is recommended for | ||
| clients that reuse the same filter multiple times, for example in | ||
| long poll requests. | ||
|
|
||
| See `Filtering <#filtering>`_ for more information. | ||
| x-example: "66696p746572" | ||
| - in: query | ||
| name: since | ||
|
|
@@ -125,6 +141,50 @@ paths: | |
| title: Joined Room | ||
| type: object | ||
| properties: | ||
| summary: | ||
| title: RoomSummary | ||
| type: object | ||
| description: |- | ||
| Information about the room which clients may need to | ||
| correctly render it to users. | ||
| properties: | ||
| "m.heroes": | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. are these properties not
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. no, because if they are omitted then the client should interpret it as "no change". |
||
| type: array | ||
| description: |- | ||
| The users which can be used to generate a room name | ||
| if the room does not have one. Required if the room's | ||
| ``m.room.name`` or ``m.room.canonical_alias`` state events | ||
| are unset or empty. | ||
|
|
||
| This should be the first 5 members of the room, ordered | ||
| by stream ordering, which are joined or invited. The | ||
| list must never include the client's own user ID. When | ||
| no joined or invited members are available, this should | ||
| consist of the banned and left users. More than 5 members | ||
| may be provided, however less than 5 should only be provided | ||
| when there are less than 5 members to represent. | ||
|
|
||
| When lazy-loading room members is enabled, the membership | ||
| events for the heroes MUST be included in the ``state``, | ||
| unless they are redundant. When the list of users changes, | ||
| the server notifies the client by sending a fresh list of | ||
| heroes. If there are no changes since the last sync, this | ||
| field may be omitted. | ||
| items: | ||
| type: string | ||
| "m.joined_member_count": | ||
| type: integer | ||
| description: |- | ||
| The number of users with ``membership`` of ``join``, | ||
| including the client's own user ID. If this field has | ||
| not changed since the last sync, it may be omitted. | ||
| Required otherwise. | ||
| "m.invited_member_count": | ||
| type: integer | ||
| description: |- | ||
| The number of users with ``membership`` of ``invite``. | ||
| If this field has not changed since the last sync, it | ||
| may be omitted. Required otherwise. | ||
| state: | ||
| title: State | ||
| type: object | ||
|
|
@@ -330,6 +390,14 @@ paths: | |
| "rooms": { | ||
| "join": { | ||
| "!726s6s6q:example.com": { | ||
| "summary": { | ||
| "m.heroes": [ | ||
| "@alice:example.com", | ||
| "@bob:example.com" | ||
| ], | ||
| "m.joined_member_count": 2, | ||
| "m.invited_member_count": 0 | ||
| }, | ||
| "state": { | ||
| "events": [ | ||
| { | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Add the option to lazy-load room members for increased client performance. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.