damus

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

commit d2c9f0eab1a34f0ac8b70d192b102e69227653d7
parent 9b79b46601b93b36f25e501bf857c74c31b2ef81
Author: William Casarin <jb55@jb55.com>
Date:   Mon, 18 Apr 2022 14:31:11 -0700

simplify reply_ids

Signed-off-by: William Casarin <jb55@jb55.com>

Diffstat:
Mdamus/Nostr/NostrEvent.swift | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/damus/Nostr/NostrEvent.swift b/damus/Nostr/NostrEvent.swift @@ -119,11 +119,11 @@ class NostrEvent: Codable, Identifiable { return false } - public func reply_ids(pubkey: String) -> [ReferencedId] { + public func reply_ids() -> [ReferencedId] { var ids = self.referenced_ids.first.map { [$0] } ?? [] ids.append(ReferencedId(ref_id: self.id, relay_id: nil, key: "e")) ids.append(contentsOf: self.referenced_pubkeys) - ids.append(ReferencedId(ref_id: pubkey, relay_id: nil, key: "p")) + ids.append(ReferencedId(ref_id: self.pubkey, relay_id: nil, key: "p")) return ids }