From a304182e55a07ebe07983958ff52f7f9110577b8 Mon Sep 17 00:00:00 2001 From: Kieran Date: Mon, 12 May 2025 09:33:27 +0100 Subject: [PATCH] fix: host tag matcher --- lib/utils.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/utils.dart b/lib/utils.dart index 29bec5a..7a3b7bd 100644 --- a/lib/utils.dart +++ b/lib/utils.dart @@ -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]; }