Merge pull request #5979 from element-hq/feature/fga/space_members_access

Change Room’s Access to/from Space members
This commit is contained in:
ganfra 2026-01-12 10:48:44 +01:00 committed by GitHub
commit 1614bd7a20
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
85 changed files with 2535 additions and 571 deletions

View file

@ -51,13 +51,28 @@ class RustSpaceService(
override suspend fun joinedSpaces(): Result<List<SpaceRoom>> = withContext(sessionDispatcher) {
runCatchingExceptions {
innerSpaceService.topLevelJoinedSpaces()
.map {
it.let(spaceRoomMapper::map)
}
innerSpaceService
.topLevelJoinedSpaces()
.map(spaceRoomMapper::map)
}
}
override suspend fun joinedParents(spaceId: RoomId): Result<List<SpaceRoom>> = withContext(sessionDispatcher) {
runCatchingExceptions {
innerSpaceService
.joinedParentsOfChild(spaceId.value)
.map(spaceRoomMapper::map)
}
}
override suspend fun getSpaceRoom(spaceId: RoomId): SpaceRoom? = withContext(sessionDispatcher) {
runCatchingExceptions {
innerSpaceService.getSpaceRoom(spaceId.value)?.let { spaceRoom ->
spaceRoomMapper.map(spaceRoom)
}
}.getOrNull()
}
override fun spaceRoomList(id: RoomId): SpaceRoomList {
val childCoroutineScope = sessionCoroutineScope.childScope(sessionDispatcher, "SpaceRoomListScope-$this")
return RustSpaceRoomList(