damus

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

commit 6ed562ed24bf2dfa2aa17401101f9afcc56b295d
parent 93580e5296bec5de4c58d182cd26d7bdb5f56a27
Author: Joshua Jiang <zhuoshengjiang@gmail.com>
Date:   Sat, 15 Apr 2023 23:05:10 -0700

Fix shuffling when choosing users to reply to

Changelog-Fixed: Fix shuffling when choosing users to reply to
Co-authored-by: William Casarin <jb55@jb55.com>
Closes: #937

Diffstat:
Mdamus/Nostr/NostrEvent.swift | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/damus/Nostr/NostrEvent.swift b/damus/Nostr/NostrEvent.swift @@ -724,7 +724,7 @@ func gather_reply_ids(our_pubkey: String, from: NostrEvent) -> [ReferencedId] { var ids = get_referenced_ids(tags: from.tags, key: "e").first.map { [$0] } ?? [] ids.append(ReferencedId(ref_id: from.id, relay_id: nil, key: "e")) - ids.append(contentsOf: from.referenced_pubkeys.filter { $0.ref_id != our_pubkey }) + ids.append(contentsOf: Set(from.referenced_pubkeys.filter { $0.ref_id != our_pubkey })) if from.pubkey != our_pubkey { ids.append(ReferencedId(ref_id: from.pubkey, relay_id: nil, key: "p")) }