Adopt the bump event types sliding sync proxy API. Allow only `m.room… (#833)

* Adopt the bump event types sliding sync proxy API. Allow only `m.room.message` and `m.room.encrypted` to reorder the room list
- matrix-org/matrix-rust-sdk/pull/1812
- matrix-org/matrix-rust-sdk/issues/1728
- matrix-org/sliding-sync/pull/34

* Allow `m.sticker`s to reorder the room list
This commit is contained in:
Stefan Ceriu
2023-04-25 16:23:10 +03:00
committed by GitHub
parent 94cfaeeaa0
commit 832fcf19f3

View File

@@ -314,11 +314,14 @@ class ClientProxy: ClientProxyProtocol {
return
}
let roomListRecencyOrderingAllowedEventTypes = ["m.room.message", "m.room.encrypted", "m.sticker"]
// Add the visibleRoomsSlidingSyncView here so that it can take advantage of the SS builder cold cache
// We will still register the allRoomsSlidingSyncView later, and than will have no cache
let slidingSync = try slidingSyncBuilder
.addList(v: visibleRoomsSlidingSyncView)
.withCommonExtensions()
.bumpEventTypes(bumpEventTypes: roomListRecencyOrderingAllowedEventTypes)
.storageKey(name: "ElementX")
.build()