From 8b600a977400519ad7f01788f3bb36b66788e122 Mon Sep 17 00:00:00 2001 From: "tappu75e@duck.com" Date: Sun, 20 Aug 2023 23:25:54 +0300 Subject: [PATCH] Avoid notification for zap from mute profiles Changelog-Fixed: Avoid notification for zaps from muted profiles Closes: https://github.com/damus-io/damus/pull/1494 Signed-off-by: William Casarin --- damus/Models/HomeModel.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/damus/Models/HomeModel.swift b/damus/Models/HomeModel.swift index b0666971..a0210a75 100644 --- a/damus/Models/HomeModel.swift +++ b/damus/Models/HomeModel.swift @@ -228,6 +228,10 @@ class HomeModel { guard zap.target.pubkey == self.damus_state.keypair.pubkey else { return } + + guard should_show_event(privkey: damus_state.keypair.privkey, hellthreads: damus_state.muted_threads, contacts: damus_state.contacts, ev: zap.request.ev) else { + return + } if !self.notifications.insert_zap(.zap(zap)) { return