diff --git a/.env.example b/.env.example index cd5bd7f..56cd5c8 100644 --- a/.env.example +++ b/.env.example @@ -87,6 +87,7 @@ # NOSTR_PRIVATE_KEY='123456abcdef...' # NOSTR_PUBLIC_KEY='123456abcdef...' # NOSTR_RELAY_URL='wss://nostr.kosmos.org' +# NOSTR_BLOSSOM_SERVER_URL='https://blossom.kosmos.org' # RS_STORAGE_URL='https://storage.kosmos.org' # RS_REDIS_URL='redis://localhost:6379/2' diff --git a/app/models/concerns/settings/nostr_settings.rb b/app/models/concerns/settings/nostr_settings.rb index a9f0657..5fd2399 100644 --- a/app/models/concerns/settings/nostr_settings.rb +++ b/app/models/concerns/settings/nostr_settings.rb @@ -18,6 +18,9 @@ module Settings field :nostr_relay_url, type: :string, default: ENV["NOSTR_RELAY_URL"].presence + field :nostr_blossom_server_url, type: :string, + default: ENV["NOSTR_BLOSSOM_SERVER_URL"].presence + field :nostr_zaps_relay_limit, type: :integer, default: 12 diff --git a/app/views/admin/settings/services/_nostr.html.erb b/app/views/admin/settings/services/_nostr.html.erb index 49aabbe..04e159d 100644 --- a/app/views/admin/settings/services/_nostr.html.erb +++ b/app/views/admin/settings/services/_nostr.html.erb @@ -29,6 +29,11 @@ title: "Relay URL", description: "Websockets URL of a relay associated with #{Setting.primary_domain}" ) %> + <%= render FormElements::FieldsetResettableSettingComponent.new( + key: :nostr_blossom_server_url, + title: "Blossom server URL", + description: "HTTP URL of the Blossom media server to add to users' server lists during onboarding" + ) %> diff --git a/app/views/settings/_nostr.html.erb b/app/views/settings/_nostr.html.erb index edd8469..1949fc3 100644 --- a/app/views/settings/_nostr.html.erb +++ b/app/views/settings/_nostr.html.erb @@ -35,7 +35,10 @@