knock : use PendingRoom instead of InvitedRoom

This commit is contained in:
ganfra 2024-10-18 20:58:19 +02:00
parent 96b24c5299
commit 73a46dcfc7
9 changed files with 46 additions and 43 deletions

View file

@ -94,8 +94,8 @@ class AcceptDeclineInvitePresenter @Inject constructor(
private fun CoroutineScope.declineInvite(roomId: RoomId, declinedAction: MutableState<AsyncAction<RoomId>>) = launch {
suspend {
client.getInvitedRoom(roomId)?.use {
it.declineInvite().getOrThrow()
client.getPendingRoom(roomId)?.use {
it.leave().getOrThrow()
notificationCleaner.clearMembershipNotificationForRoom(client.sessionId, roomId)
}
roomId