Merge branch 'master' into local-relay-model

Logical merge errors fixed manually

Changelog-None
Signed-off-by: Daniel D’Aquino <daniel@daquino.me>
This commit is contained in:
Daniel D’Aquino
2025-10-22 11:37:09 -07:00
22 changed files with 790 additions and 81 deletions

View File

@@ -872,4 +872,31 @@ extension NostrEvent {
return nil
}
}
#if DEBUG
var debugDescription: String {
var output = "🔍 NostrEvent Debug Info\n"
output += "═══════════════════════════\n"
output += "📝 ID: \(id)\n"
output += "👤 Pubkey: \(pubkey)\n"
output += "📅 Created: \(Date(timeIntervalSince1970: TimeInterval(created_at))) (\(created_at))\n"
output += "🏷️ Kind: \(kind) (\(String(describing: known_kind))\n"
output += "✍️ Signature: \(sig)\n"
output += "📄 Content (\(content.count) chars):\n"
output += " \"\(content.prefix(100))\(content.count > 100 ? "..." : "")\"\n"
output += "\n🏷️ Tags (\(tags.count) total):\n"
for (index, tag) in tags.enumerated() {
output += " [\(index)]: ["
for (tagIndex, tagElem) in tag.enumerated() {
if tagIndex > 0 { output += ", " }
output += "\"\(tagElem.string())\""
}
output += "]\n"
}
output += "═══════════════════════════\n"
return output
}
#endif
}

View File

@@ -31,5 +31,6 @@ enum NostrKind: UInt32, Codable {
case nwc_response = 23195
case http_auth = 27235
case status = 30315
case contact_card = 30_382
case follow_list = 39089
}