damus

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

commit 8369b05c100da60a5dabd1e507c29515efab99c3
parent 5e63eca0e99b28fe34ac09fbc05c778e308234bb
Author: William Casarin <jb55@jb55.com>
Date:   Sun,  8 May 2022 19:02:57 -0700

remove some old replyref stuff

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

Diffstat:
Ddamus/Models/ParsedRefs.swift | 15---------------
Mdamus/Nostr/NostrEvent.swift | 13-------------
2 files changed, 0 insertions(+), 28 deletions(-)

diff --git a/damus/Models/ParsedRefs.swift b/damus/Models/ParsedRefs.swift @@ -1,15 +0,0 @@ -// -// ParsedRefs.swift -// damus -// -// Created by William Casarin on 2022-04-30. -// - -import Foundation - - -struct ReplyRefs { - let thread_id: String - let direct_reply: String -} - diff --git a/damus/Nostr/NostrEvent.swift b/damus/Nostr/NostrEvent.swift @@ -323,19 +323,6 @@ func tag_to_refid(_ tag: [String]) -> ReferencedId? { return ReferencedId(ref_id: tag[1], relay_id: relay_id, key: tag[0]) } -func parse_reply_refs(tags: [[String]]) -> ReplyRefs? { - let ids = get_referenced_ids(tags: tags, key: "e") - - if ids.count == 0 { - return nil - } - - let first = ids.first! - let last = ids.last! - - return ReplyRefs(thread_id: first.ref_id, direct_reply: last.ref_id) -} - func get_referenced_ids(tags: [[String]], key: String) -> [ReferencedId] { return tags.reduce(into: []) { (acc, tag) in if tag.count >= 2 && tag[0] == key {