Add suggestion of users when starting a Chat #2634

This commit is contained in:
Benoit Marty
2024-04-08 11:41:31 +02:00
committed by Benoit Marty
parent 124426e44b
commit b68ecbf0c4
16 changed files with 285 additions and 53 deletions

View File

@@ -237,6 +237,16 @@ class RustMatrixRoom(
roomMemberListFetcher.fetchRoomMembers(source = source)
}
override suspend fun getMembers(limit: Int) = withContext(roomDispatcher) {
runCatching {
innerRoom.members().use {
it.nextChunk(limit.toUInt()).orEmpty().map { roomMember ->
RoomMemberMapper.map(roomMember)
}
}
}
}
override suspend fun getUpdatedMember(userId: UserId): Result<RoomMember> = withContext(roomDispatcher) {
runCatching {
RoomMemberMapper.map(innerRoom.member(userId.value))