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 <jb55@jb55.com>
This commit is contained in:
tappu75e@duck.com
2023-08-20 23:25:54 +03:00
committed by William Casarin
parent 286ae68fd6
commit 8b600a9774

View File

@@ -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