change(invites) : add logic to decline invite and block a user
This commit is contained in:
parent
e2116e76f2
commit
82dc29b91c
13 changed files with 145 additions and 63 deletions
|
|
@ -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,
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue