fix: host tag matcher

This commit is contained in:
2025-05-12 09:33:27 +01:00
parent 59ac3f502a
commit a304182e55

View File

@ -201,7 +201,7 @@ StreamInfo extractStreamInfo(Nip01Event ev) {
String getHost(Nip01Event ev) {
return ev.tags.firstWhere(
(t) => t[0] == "p" && t[3] == "host",
(t) => t[0] == "p" && t.length > 2 && t[3] == "host",
orElse: () => ["p", ev.pubKey], // fake p tag with event pubkey
)[1];
}