Skip to content

Commit

Permalink
room list/notification services: don't request the room avatar since …
Browse files Browse the repository at this point in the history
…it's always provided

It's always provided in the `avatar` response in the field, which
sliding sync's using by default, so there's no need to request the
`m.room.avatar` event too.
  • Loading branch information
bnjbvr committed May 17, 2024
1 parent bac0654 commit 4cc67e9
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 6 deletions.
1 change: 0 additions & 1 deletion crates/matrix-sdk-ui/src/notification_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,6 @@ impl NotificationClient {

// Room power levels are necessary to build the push context.
let required_state = vec![
(StateEventType::RoomAvatar, "".to_owned()),
(StateEventType::RoomEncryption, "".to_owned()),
(StateEventType::RoomMember, "$LAZY".to_owned()),
(StateEventType::RoomMember, "$ME".to_owned()),
Expand Down
1 change: 0 additions & 1 deletion crates/matrix-sdk-ui/src/room_list_service/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,6 @@ impl RoomListService {
)
.timeline_limit(1)
.required_state(vec![
(StateEventType::RoomAvatar, "".to_owned()),
(StateEventType::RoomEncryption, "".to_owned()),
(StateEventType::RoomMember, "$LAZY".to_owned()),
(StateEventType::RoomMember, "$ME".to_owned()),
Expand Down
2 changes: 0 additions & 2 deletions crates/matrix-sdk-ui/tests/integration/notification_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,6 @@ async fn test_notification_client_sliding_sync() {
[0, 16]
],
"required_state": [
["m.room.avatar", ""],
["m.room.encryption", ""],
["m.room.member", "$LAZY"],
["m.room.member", "$ME"],
Expand All @@ -275,7 +274,6 @@ async fn test_notification_client_sliding_sync() {
"room_subscriptions": {
"!a98sd12bjh:example.org": {
"required_state": [
["m.room.avatar", ""],
["m.room.encryption", ""],
["m.room.member", "$LAZY"],
["m.room.member", "$ME"],
Expand Down
2 changes: 0 additions & 2 deletions crates/matrix-sdk-ui/tests/integration/room_list_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,6 @@ async fn test_sync_all_states() -> Result<(), Error> {
ALL_ROOMS: {
"ranges": [[0, 19]],
"required_state": [
["m.room.avatar", ""],
["m.room.encryption", ""],
["m.room.member", "$LAZY"],
["m.room.member", "$ME"],
Expand Down Expand Up @@ -1815,7 +1814,6 @@ async fn test_dynamic_entries_stream_manual_update() -> Result<(), Error> {
"lists": {
ALL_ROOMS: {
"required_state": [
["m.room.avatar", ""],
["m.room.encryption", ""],
["m.room.member", "$LAZY"],
["m.room.member", "$ME"],
Expand Down

0 comments on commit 4cc67e9

Please sign in to comment.