Remove unnecessary Room.updateMembers() calls. (#2564)
* Remove unnecessary `updateMembers` calls. Some of them can be directly removed since we have a way to automatically get member info updates based on membership changes. Others can be replaced by a simpler `getUpdatedMember` method. This might still need a full member sync, but it's quite unlikely.
This commit is contained in:
parent
fde154a284
commit
883d834284
8 changed files with 26 additions and 37 deletions
|
|
@ -230,6 +230,12 @@ class RustMatrixRoom(
|
|||
roomMemberListFetcher.fetchRoomMembers(source = source)
|
||||
}
|
||||
|
||||
override suspend fun getUpdatedMember(userId: UserId): Result<RoomMember> = withContext(roomDispatcher) {
|
||||
runCatching {
|
||||
RoomMemberMapper.map(innerRoom.member(userId.value))
|
||||
}
|
||||
}
|
||||
|
||||
override suspend fun userDisplayName(userId: UserId): Result<String?> = withContext(roomDispatcher) {
|
||||
runCatching {
|
||||
innerRoom.memberDisplayName(userId.value)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue