Skip to content

Commit beac047

Browse files
committed
Fix Party invitation processing
1 parent 47243a6 commit beac047

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

common/src/commonMain/kotlin/cz/frantisekmasa/wfrp_master/common/invitation/domain/FirestoreInvitationProcessor.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@ import cz.frantisekmasa.wfrp_master.common.core.domain.party.PartyRepository
88
import dev.gitlive.firebase.firestore.FieldValue
99
import dev.gitlive.firebase.firestore.FieldValue.Companion.arrayUnion
1010
import dev.gitlive.firebase.firestore.FirebaseFirestore
11+
import dev.gitlive.firebase.firestore.FirebaseFirestoreException
1112
import dev.gitlive.firebase.firestore.Transaction
1213
import kotlinx.serialization.Serializable
1314

15+
// TODO: Replace by cloud function
1416
class FirestoreInvitationProcessor(
1517
private val firestore: FirebaseFirestore,
1618
private val parties: PartyRepository,
@@ -60,6 +62,8 @@ class FirestoreInvitationProcessor(
6062
parties.get(this, partyId).isMember(userId)
6163
} catch (e: PartyNotFound) {
6264
false
65+
} catch (e: FirebaseFirestoreException) {
66+
false
6367
}
6468
}
6569
}

0 commit comments

Comments
 (0)