support kind 42 chat messages

Changelog-Added: Support kind 42 chat messages (ArcadeCity).
Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
William Casarin
2022-08-19 07:21:18 -07:00
parent 8141a2970c
commit d7b5669ecf
9 changed files with 36 additions and 7 deletions

View File

@@ -8,8 +8,21 @@
import Foundation
struct NostrPost {
let kind: NostrKind
let content: String
let references: [ReferencedId]
init (content: String, references: [ReferencedId]) {
self.content = content
self.references = references
self.kind = .text
}
init (content: String, references: [ReferencedId], kind: NostrKind) {
self.content = content
self.references = references
self.kind = kind
}
}
// TODO: parse nostr:{e,p}:pubkey uris as well