getTimelineEventsAround

abstract fun getTimelineEventsAround(startFrom: EventId, roomId: RoomId, maxSizeBefore: StateFlow<Int>, maxSizeAfter: StateFlow<Int>, decryptionTimeout: Duration = INFINITE, fetchTimeout: Duration = 1.minutes, limitPerFetch: Long = 20): Flow<List<Flow<TimelineEvent?>>>

Returns all timeline events around a starting event. This also triggers decryption for each timeline event.

The size of the returned list can be expanded in 2 directions: before and after the start element.

Parameters

startFrom

the start event id

maxSizeBefore

how many events to possibly get before the start event

maxSizeAfter

how many events to possibly get after the start event