Merge branch 'develop' into feature/fga/safer_callback_flows
This commit is contained in:
@@ -147,7 +147,8 @@ class RustMatrixClient constructor(
|
||||
if (syncState == SyncState.Running) {
|
||||
onSlidingSyncUpdate()
|
||||
}
|
||||
}.launchIn(sessionCoroutineScope)
|
||||
}
|
||||
.launchIn(sessionCoroutineScope)
|
||||
}
|
||||
|
||||
override suspend fun getRoom(roomId: RoomId): MatrixRoom? = withContext(sessionDispatcher) {
|
||||
@@ -227,7 +228,8 @@ class RustMatrixClient constructor(
|
||||
roomSummaryDataSource.allRooms()
|
||||
.filter { roomSummaries ->
|
||||
roomSummaries.map { it.identifier() }.contains(roomId.value)
|
||||
}.first()
|
||||
}
|
||||
.first()
|
||||
}
|
||||
roomId
|
||||
}
|
||||
|
||||
@@ -93,7 +93,7 @@ class RustMatrixAuthenticationService @Inject constructor(
|
||||
client.restoreSession(sessionData.toSession())
|
||||
createMatrixClient(client)
|
||||
} else {
|
||||
throw IllegalStateException("No session to restore with id $sessionId")
|
||||
error("No session to restore with id $sessionId")
|
||||
}
|
||||
}.mapFailure { failure ->
|
||||
failure.mapClientException()
|
||||
|
||||
@@ -250,6 +250,12 @@ class RustMatrixRoom(
|
||||
}
|
||||
}
|
||||
|
||||
override suspend fun canUserRedact(userId: UserId): Result<Boolean> {
|
||||
return runCatching {
|
||||
innerRoom.canUserRedact(userId.value)
|
||||
}
|
||||
}
|
||||
|
||||
override suspend fun canUserSendState(userId: UserId, type: StateEventType): Result<Boolean> {
|
||||
return runCatching {
|
||||
innerRoom.canUserSendState(userId.value, type.map())
|
||||
|
||||
@@ -64,7 +64,8 @@ internal class RustRoomSummaryDataSource(
|
||||
.map { it.toRoomSummaryDataSourceLoadingState() }
|
||||
.onEach {
|
||||
allRoomsLoadingState.value = it
|
||||
}.launchIn(this)
|
||||
}
|
||||
.launchIn(this)
|
||||
|
||||
launch {
|
||||
// Wait until running, as invites is only available after that
|
||||
|
||||
@@ -118,7 +118,8 @@ class RustMatrixTimeline(
|
||||
innerRoom.backPaginationStatusFlow()
|
||||
.onEach {
|
||||
postPaginationStatus(it)
|
||||
}.launchIn(this)
|
||||
}
|
||||
.launchIn(this)
|
||||
|
||||
taskHandleBag += fetchMembers().getOrNull()
|
||||
}.invokeOnCompletion {
|
||||
|
||||
@@ -27,7 +27,7 @@ import java.util.Date
|
||||
|
||||
class TimelineEncryptedHistoryPostProcessorTest {
|
||||
|
||||
private val defaultLastLoginTimestamp = Date(1689061264L)
|
||||
private val defaultLastLoginTimestamp = Date(1_689_061_264L)
|
||||
|
||||
@Test
|
||||
fun `given an unencrypted room, nothing is done`() {
|
||||
|
||||
Reference in New Issue
Block a user