Add support for nostr: bech32 urls in posts and DMs (NIP19)

Changelog-Added: Add support for nostr: bech32 urls in posts and DMs (NIP19)
This commit is contained in:
Bartholomew Joyce
2023-03-30 02:26:54 +02:00
committed by William Casarin
parent a2cd51b6e7
commit c6f4643b5a
4 changed files with 260 additions and 19 deletions

View File

@@ -74,7 +74,9 @@ func build_mention_indices(_ blocks: [Block], type: MentionType) -> Set<Int> {
switch block {
case .mention(let m):
if m.type == type {
acc.insert(m.index)
if let idx = m.index {
acc.insert(idx)
}
}
case .text:
return