Sliding sync : update RoomSubscription values as per EXI.

This commit is contained in:
ganfra 2024-06-06 17:50:49 +02:00
parent 1a13a591f8
commit 290961ebd0

View file

@ -27,6 +27,8 @@ import org.matrix.rustcomponents.sdk.RoomListService
import org.matrix.rustcomponents.sdk.RoomSubscription import org.matrix.rustcomponents.sdk.RoomSubscription
import timber.log.Timber import timber.log.Timber
private const val DEFAULT_TIMELINE_LIMIT = 20u
class RoomSyncSubscriber( class RoomSyncSubscriber(
private val roomListService: RoomListService, private val roomListService: RoomListService,
private val dispatchers: CoroutineDispatchers, private val dispatchers: CoroutineDispatchers,
@ -41,8 +43,9 @@ class RoomSyncSubscriber(
RequiredState(key = EventType.STATE_ROOM_JOIN_RULES, value = ""), RequiredState(key = EventType.STATE_ROOM_JOIN_RULES, value = ""),
RequiredState(key = EventType.STATE_ROOM_POWER_LEVELS, value = ""), RequiredState(key = EventType.STATE_ROOM_POWER_LEVELS, value = ""),
), ),
timelineLimit = null, timelineLimit = DEFAULT_TIMELINE_LIMIT,
includeHeroes = true, // We don't need heroes here as they're already included in the `all_rooms` list
includeHeroes = false,
) )
suspend fun subscribe(roomId: RoomId) = mutex.withLock { suspend fun subscribe(roomId: RoomId) = mutex.withLock {