remove some old replyref stuff

Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
William Casarin
2022-05-08 19:02:57 -07:00
parent 5e63eca0e9
commit 8369b05c10
2 changed files with 0 additions and 28 deletions

View File

@@ -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
}

View File

@@ -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 {