Bug fix on sending welcomingEvent to self
This commit is contained in:
@@ -129,6 +129,7 @@ abstract class MarmotOutboundDao(
|
||||
relays: List<String> = Relays.DefaultDMRelayList.map { it.url },
|
||||
isOneMemberInitialGroupCreation: Boolean
|
||||
) {
|
||||
logger.d("inviteMember: $peerPublicKey")
|
||||
val keyPackage = MlsKeyPackage.decodeTls(
|
||||
TlsReader(
|
||||
peerKeyPackage.tlsEncodedMarmotKeyPackage
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user