ThreadReply.swift (603B)
1 // 2 // ThreadReply.swift 3 // damus 4 // 5 // Created by William Casarin on 2024-05-09. 6 // 7 8 import Foundation 9 10 11 struct ThreadReply { 12 let root: NoteRef 13 let reply: NoteRef 14 let mention: Mention<NoteRef>? 15 16 var is_reply_to_root: Bool { 17 return root.id == reply.id 18 } 19 20 init(root: NoteRef, reply: NoteRef, mention: Mention<NoteRef>?) { 21 self.root = root 22 self.reply = reply 23 self.mention = mention 24 } 25 26 init?(tags: TagsSequence) { 27 guard let tr = interpret_event_refs_ndb(tags: tags) else { 28 return nil 29 } 30 self = tr 31 } 32 }