damus

nostr ios client
git clone git://jb55.com/damus
Log | Files | Refs | README | LICENSE

commit c218e0dcdd5eaae0a1101759ec3050229cef74f3
parent 892765eaa5d513721623d7d144ca7ae153014b95
Author: William Casarin <jb55@jb55.com>
Date:   Thu, 22 Jun 2023 09:43:26 +0200

refactor: use zap.is_anon instead of recomputing

I believe this code was written before we computed is_anon inside the
zap.

Diffstat:
Mdamus/Models/HomeModel.swift | 3+--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/damus/Models/HomeModel.swift b/damus/Models/HomeModel.swift @@ -1075,8 +1075,7 @@ func zap_notification_title(_ zap: Zap) -> String { func zap_notification_body(profiles: Profiles, zap: Zap, locale: Locale = Locale.current) -> String { let src = zap.request.ev - let anon = event_is_anonymous(ev: src) - let pk = anon ? "anon" : src.pubkey + let pk = zap.is_anon ? "anon" : src.pubkey let profile = profiles.lookup(id: pk) let sats = NSNumber(value: (Double(zap.invoice.amount) / 1000.0)) let formattedSats = format_msats_abbrev(zap.invoice.amount)