WIP: Improve Nostr user metadata fetching

Use a multi-step process, caching results in between, while informing
the user about the current steps/progress
This commit is contained in:
2026-08-11 18:16:58 -06:00
parent 52742ba305
commit a9045fa413
9 changed files with 145 additions and 70 deletions
@@ -2,9 +2,11 @@
module Settings
class NostrRelayStatusComponent < ViewComponent::Base
def initialize(nip65_event:)
def initialize(nip65_event:, relay_url: Setting.nostr_relay_url)
@relay_url = relay_url
if nip65_event.present?
if relay_urls(nip65_event).any? { |r| r.include?("wss://nostr.kosmos.org") }
if relay_urls(nip65_event).include?(@relay_url)
@text = "You have a relay list, and the Kosmos relay is part of it"
@icon_name = "check-circle"
@icon_color = "emerald-500"