From cff98161ee274684775d7c6d25b6d1763c6f4a92 Mon Sep 17 00:00:00 2001 From: William Casarin Date: Sun, 5 Mar 2023 15:15:23 -0500 Subject: [PATCH] Don't show notifications from ourselves Changelog-Fixed: Don't show notifications from ourselves --- damus/Models/HomeModel.swift | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/damus/Models/HomeModel.swift b/damus/Models/HomeModel.swift index 72fe2a11..da69283c 100644 --- a/damus/Models/HomeModel.swift +++ b/damus/Models/HomeModel.swift @@ -453,6 +453,11 @@ class HomeModel: ObservableObject { } func handle_notification(ev: NostrEvent) { + // don't show notifications from ourselves + guard ev.pubkey != damus_state.pubkey else { + return + } + guard event_has_our_pubkey(ev, our_pubkey: self.damus_state.pubkey) else { return }