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 lazy_load_members and include_redundant_members #1287

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all 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
20 changes: 20 additions & 0 deletions api/client-server/definitions/room_event_filter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,24 @@ properties:
type: boolean
description: If ``true``, includes only events with a url key in their content. If
``false``, excludes those events.
lazy_load_members:
type: boolean
description: If ``true``, the only ``m.room.member`` events returned in the ``state``
section of the ``/sync`` response are those which are definitely necessary for a
client to display the ``sender`` of the timeline events in that response. If
``false``, ``m.room.member`` events are not filtered. By default, servers should
suppress duplicate redundant lazy-loaded ``m.room.member`` events from being sent to a
given client across multiple calls to ``/sync``, given that most clients cache
membership events (see include_redundant_members to change this behaviour).
include_redundant_members:
type: boolean
description: If ``true``, the ``state`` section of the ``/sync`` response will
always contain the ``m.room.member`` events required to display the ``sender``
of the timeline events in that response, assuming ``lazy_load_members`` is enabled.
This means that redundant duplicate member events may be returned across multiple
calls to ``/sync``. This is useful for naive clients who never track membership data.
If ``false``, duplicate ``m.room.member`` events may be suppressed by the server
across multiple calls to ``/sync``. If ``lazy_load_members`` is ``false`` this field
is ignored.

type: object
6 changes: 6 additions & 0 deletions api/client-server/sync.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,12 @@ paths:
``timeline`` (or all state up to the start of the
``timeline``, if ``since`` is not given, or
``full_state`` is true).

N.B. state updates for ``m.room.member`` events will
be incomplete if ``lazy_load_members`` is enabled in
the ``/sync`` filter, and only return the member events
required to display the senders of the timeline events
in this response.
allOf:
- $ref: "definitions/event_batch.yaml"
timeline:
Expand Down