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:
commit
1614bd7a20
85 changed files with 2535 additions and 571 deletions
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue