Doesn't notify if the GiftWrap's inner message came from the user.

This commit is contained in:
Vitor Pamplona
2023-09-01 12:35:21 -04:00
parent 872c7cb257
commit 672841c0ed

View File

@@ -75,7 +75,7 @@ class EventNotificationConsumer(private val applicationContext: Context) {
if (acc != null && acc.userProfile().pubkeyHex == giftWrap.recipientPubKey()) {
val chatEvent = unwrapAndConsume(giftWrap, account = acc)
if (chatEvent is ChatMessageEvent && acc.keyPair.privKey != null) {
if (chatEvent is ChatMessageEvent && acc.keyPair.privKey != null && chatEvent.pubKey != acc.userProfile().pubkeyHex) {
val chatNote = LocalCache.notes[chatEvent.id] ?: return
val chatRoom = chatEvent.chatroomKey(acc.keyPair.pubKey.toHexKey())