-
Notifications
You must be signed in to change notification settings - Fork 269
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
feat(ui): Revisit required_state
for RoomListService
#4159
feat(ui): Revisit required_state
for RoomListService
#4159
Conversation
This patch adds the `m.call.member` state event in the `required_state` for `all_rooms` of the `RoomListService`.
This patch adds the `m.room.topic` and `m.room.pinned_events` state events in the `required_state` of the `all_rooms` sliding sync list of `RoomListService`.
e2bbc5d
to
6bca1ab
Compare
bab2cc7
to
4f586ff
Compare
…ings` argument. This patch removes the `settings` argument of `RoomListService::subscribe_to_rooms`. The settings were mostly composed of: * `required_state`: now shared with `all_rooms`, so that we are sure they are synced; except that `m.room.create` is added for subscriptions. * `timeline_limit`: now defaults to 20. This patch thus creates the `DEFAULT_REQUIRED_STATE` and `DEFAULT_ROOM_SUBSCRIPTION_TIMELINE_LIMIT` constants. Finally, this patch updates the tests, and updates all usages of `subscribe_to_rooms`.
…onstant. This patch refactors 2 `chain(once(…))` with a 1 `chain`. It also clarifies the extra `required_state` that are added for room subscriptions.
66721b6
to
1c6399c
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4159 +/- ##
=======================================
Coverage 84.82% 84.83%
=======================================
Files 269 269
Lines 28862 28858 -4
=======================================
- Hits 24482 24481 -1
+ Misses 4380 4377 -3 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Talked about most of this offline, looks good to me and works well in EXI
@@ -151,8 +151,8 @@ impl RoomListService { | |||
(StateEventType::RoomMember, "$ME".to_owned()), | |||
(StateEventType::RoomName, "".to_owned()), | |||
(StateEventType::RoomCanonicalAlias, "".to_owned()), | |||
(StateEventType::RoomAvatar, "".to_owned()), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Best leave an explanation for this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I cannot add a comment in the code, but I can comment here.
Sliding sync already supplies a response.avatar
value, so we don't need to request the m.room.avatar
state event.
…e through sliding sync - introduced in #4159 with an empty string - call members use custom `state_key`s and as such not specifying the sentinel won't match them and state won't be returned
…e through sliding sync - introduced in #4159 with an empty string - call members use custom `state_key`s and as such not specifying the sentinel won't match them and state won't be returned
…e through sliding sync - introduced in #4159 with an empty string - call members use custom `state_key`s and as such not specifying the sentinel won't match them and state won't be returned
…e through sliding sync - introduced in #4159 with an empty string - call members use custom `state_key`s and as such not specifying the sentinel won't match them and state won't be returned
* Bump rust-sdk version to rust-sdk 0.2.57 * rust sdk update: Support persisted WedgeQueueError * Trust & Decoration | Support new expected UTD causes * Room Subscribtion settings not needed anymore (see matrix-org/matrix-rust-sdk#4159) * File/Attachement upload: update to support `storeInCache` * feat(knock): update API to use reason and serverNames * Add another `Konsist` exception * Update screenshots --------- Co-authored-by: Jorge Martín <[email protected]> Co-authored-by: ElementBot <[email protected]> Co-authored-by: Benoit Marty <[email protected]>
This patch updates
matrix_sdk_ui::room_list_service
, and is twofold:First off, it adds
m.call.member
,m.room.topic
andm.room.pinned_events
torequired_state
of theall_rooms
sliding sync list.Second, this
required_state
sliding sync list value is easily out-of-sync withthe
required_state
sliding sync room subscription value. Thus, this patchremoves the
settings
argument ofRoomListService::subscribe_to_rooms
andcomputes its own
RoomSubscription
instance. Forrequired_state
, it uses thesame
required_state
used by theall_rooms
list, plus them.room.create
state event. For
timeline_limit
, it uses 20 by default (this is not thedefault value we were using in our tests, but that's the default value most
Matrix clients use).