Files
damus/damus/Models/Post.swift
William Casarin 514a053dce nip10: marker replies
This should drastically increase compatibility for damus replies in
other clients.

Also filter non-pubkey references when replying so we don't run into the
q-tag bug.

Changelog-Added: Added nip10 marker replies
Changelog-Fixed: Fixed issue where some replies were including the q tag
Fixes: https://github.com/damus-io/damus/issues/2239
Fixes: https://github.com/damus-io/damus/issues/2233
Signed-off-by: William Casarin <jb55@jb55.com>
2024-05-09 13:33:04 -07:00

28 lines
512 B
Swift

//
// Post.swift
// damus
//
// Created by William Casarin on 2022-05-07.
//
import Foundation
struct NostrPost {
let kind: NostrKind
let content: String
let tags: [[String]]
init(content: String, kind: NostrKind = .text, tags: [[String]] = []) {
self.content = content
self.kind = kind
self.tags = tags
}
}
/// Return a list of tags
func parse_post_blocks(content: String) -> [Block] {
return parse_note_content(content: .content(content, nil)).blocks
}