diff --git a/composeApp/src/commonMain/kotlin/at/torch/compose/database/dao/MarmotOutboundDao.kt b/composeApp/src/commonMain/kotlin/at/torch/compose/database/dao/MarmotOutboundDao.kt index dfb4e1b5..f9625cc1 100644 --- a/composeApp/src/commonMain/kotlin/at/torch/compose/database/dao/MarmotOutboundDao.kt +++ b/composeApp/src/commonMain/kotlin/at/torch/compose/database/dao/MarmotOutboundDao.kt @@ -129,6 +129,7 @@ abstract class MarmotOutboundDao( relays: List = Relays.DefaultDMRelayList.map { it.url }, isOneMemberInitialGroupCreation: Boolean ) { + logger.d("inviteMember: $peerPublicKey") val keyPackage = MlsKeyPackage.decodeTls( TlsReader( peerKeyPackage.tlsEncodedMarmotKeyPackage diff --git a/composeApp/src/commonMain/kotlin/at/torch/compose/database/repository/DatabaseChatRepository.kt b/composeApp/src/commonMain/kotlin/at/torch/compose/database/repository/DatabaseChatRepository.kt index 378a609e..d5c60280 100644 --- a/composeApp/src/commonMain/kotlin/at/torch/compose/database/repository/DatabaseChatRepository.kt +++ b/composeApp/src/commonMain/kotlin/at/torch/compose/database/repository/DatabaseChatRepository.kt @@ -245,8 +245,8 @@ class DatabaseChatRepository( nostrSignerSync: NostrSignerSync ) { database.participantDao().findParticipantsByChatRoomId(giftWrapPayload.chatRoomId).forEachIndexed { index, participant -> - if (giftWrapPayload.kind == WelcomeEvent.KIND && giftWrapPayload.publicKey != participant.participantPublicKey) { - logger.w("We shouldn't be gift wrapping welcome event to anyone but the intended public key (${giftWrapPayload.id}).") + if (giftWrapPayload.kind == WelcomeEvent.KIND && nostrSignerSync.pubKey == participant.participantPublicKey) { + logger.w("We shouldn't be gift wrapping welcome event to ourselves (${nostrSignerSync.pubKey}).") } else { val wrapperKeyPair = KeyPair() val wrapperSigner = NostrSignerSync(