From 832fcf19f369d514b6edf9730c26c765ed5be15d Mon Sep 17 00:00:00 2001 From: Stefan Ceriu Date: Tue, 25 Apr 2023 16:23:10 +0300 Subject: [PATCH] =?UTF-8?q?Adopt=20the=20bump=20event=20types=20sliding=20?= =?UTF-8?q?sync=20proxy=20API.=20Allow=20only=20`m.room=E2=80=A6=20(#833)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 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 --- ElementX/Sources/Services/Client/ClientProxy.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ElementX/Sources/Services/Client/ClientProxy.swift b/ElementX/Sources/Services/Client/ClientProxy.swift index 10c756b2f..7ab65022f 100644 --- a/ElementX/Sources/Services/Client/ClientProxy.swift +++ b/ElementX/Sources/Services/Client/ClientProxy.swift @@ -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()