Merge pull request #2991 from element-hq/feature/fga/fix_room_subscription_values
Sliding sync : update RoomSubscription values as per EXI.
This commit is contained in:
commit
30ddfe893f
1 changed files with 5 additions and 2 deletions
|
|
@ -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 {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue