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:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user