Merge pull request #4353 from element-hq/feature/fga/room_preview_invite_state

[Change] Invited state room preview
This commit is contained in:
ganfra 2025-03-04 16:45:50 +01:00 committed by GitHub
commit 0d1a35970d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
28 changed files with 327 additions and 144 deletions

View file

@ -329,9 +329,12 @@ class RoomListPresenter @Inject constructor(
}
@VisibleForTesting
internal fun RoomListRoomSummary.toInviteData() = InviteData(
roomId = roomId,
// Note: `name` should not be null at this point, but just in case, fallback to the roomId
roomName = name ?: roomId.value,
isDm = isDm,
)
internal fun RoomListRoomSummary.toInviteData(): InviteData? {
if (inviteSender == null) return null
return InviteData(
roomId = roomId,
roomName = name ?: roomId.value,
isDm = isDm,
senderId = inviteSender.userId,
)
}