From 8369b05c100da60a5dabd1e507c29515efab99c3 Mon Sep 17 00:00:00 2001 From: William Casarin Date: Sun, 8 May 2022 19:02:57 -0700 Subject: [PATCH] remove some old replyref stuff Signed-off-by: William Casarin --- damus/Models/ParsedRefs.swift | 15 --------------- damus/Nostr/NostrEvent.swift | 13 ------------- 2 files changed, 28 deletions(-) delete mode 100644 damus/Models/ParsedRefs.swift diff --git a/damus/Models/ParsedRefs.swift b/damus/Models/ParsedRefs.swift deleted file mode 100644 index ef15c3fa..00000000 --- a/damus/Models/ParsedRefs.swift +++ /dev/null @@ -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 index 41c6284f..86bf9c42 100644 --- 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 {