diff --git a/Sources/EffemKit/Models/Comment.swift b/Sources/EffemKit/Models/Comment.swift index e83cccd..43994c8 100644 --- a/Sources/EffemKit/Models/Comment.swift +++ b/Sources/EffemKit/Models/Comment.swift @@ -16,6 +16,28 @@ public struct Comment: Codable, Sendable, Identifiable { /// AT URI for this comment record. public var uri: String { "at://\(did)/xyz.effem.feed.comment/\(rkey)" } + + public init( + did: String, + rkey: String, + episode: EpisodeRef, + text: String, + timestamp: Int? = nil, + replyRoot: String? = nil, + replyParent: String? = nil, + createdAt: String, + author: CommentAuthor? = nil + ) { + self.did = did + self.rkey = rkey + self.episode = episode + self.text = text + self.timestamp = timestamp + self.replyRoot = replyRoot + self.replyParent = replyParent + self.createdAt = createdAt + self.author = author + } } /// Minimal author info hydrated by the AppView.