diff --git a/src/more_speech/migrator.clj b/src/more_speech/migrator.clj index e80cba3..8861ca6 100644 --- a/src/more_speech/migrator.clj +++ b/src/more_speech/migrator.clj @@ -30,7 +30,7 @@ :private-key (util/bytes->hex-string private-key)}) (println "A private and public key have been generated for you.") (println "Your temporary user name is: " temp-user-name) - (println "Please edit private/keys to change it.")) + (println "Please go to Manage->Profile to change it.")) ) (when-not (file-exists? @config/nicknames-filename) (spit @config/nicknames-filename {16r2ef93f01cd2493e04235a6b87b10d3c4a74e2a7eb7c3caf168268f6af73314b5 "unclebobmartin"})) diff --git a/src/more_speech/ui/swing/profile_window.clj b/src/more_speech/ui/swing/profile_window.clj index 860b8e1..14bec2f 100644 --- a/src/more_speech/ui/swing/profile_window.clj +++ b/src/more_speech/ui/swing/profile_window.clj @@ -6,6 +6,7 @@ [more-speech.mem :refer :all] [more-speech.nostr.elliptic-signature :as es] [more-speech.nostr.event-composers :as event-composers] + [more-speech.nostr.protocol :as protocol] [more-speech.nostr.util :as util]) (:use (seesaw [core]))) @@ -160,7 +161,8 @@ :nip05 nip05 :lud16 lud16}) (data-storage/write-keys (get-mem :keys)) - (future (event-composers/compose-and-send-metadata-event))) + (future (event-composers/compose-and-send-metadata-event) + (protocol/request-profiles-and-contacts-for [public-key]))) (close-profile-frame (select (get-mem :frame) [:#profile-menu]) nil) (dispose! profile-frame)))) diff --git a/src/more_speech/ui/swing/relay_manager.clj b/src/more_speech/ui/swing/relay_manager.clj index 9068c28..2760960 100644 --- a/src/more_speech/ui/swing/relay_manager.clj +++ b/src/more_speech/ui/swing/relay_manager.clj @@ -1,13 +1,13 @@ (ns more-speech.ui.swing.relay-manager - (:use [seesaw core]) (:require + [more-speech.config :as config] [more-speech.data-storage :as data-storage] [more-speech.mem :refer :all] [more-speech.nostr.protocol :as protocol] - [more-speech.config :as config] [more-speech.nostr.relays :as relays] [more-speech.nostr.util :as util] [more-speech.ui.swing.article-panel :as article-panel]) + (:use (seesaw [core])) (:import (java.awt Point) (java.util Timer TimerTask))) @@ -65,27 +65,27 @@ "" body "")) (defn show-relay-info [url _e] - (let [relay-info (get-in @relays [url :relay-info]) - html-doc (make-html-document - config/editor-pane-stylesheet - (str "

Name:

" (get relay-info "name") - "

Description:

" (get relay-info "description") - "

Pubkey:

" (get relay-info "pubkey") - "

Contact:

" (get relay-info "contact") - "

Software:

" (get relay-info "software") " V:" (get relay-info "version") - ) - ) - info-pane (editor-pane - :content-type "text/html" - :editable? false - :id :article-area - :text html-doc) - info-frame (frame :title (str "Relay info for " (relays/get-domain-name url)) - :content (scrollable info-pane) - :size [500 :by 600])] - (listen info-pane :hyperlink article-panel/open-link) - (pack! info-frame) - (show! info-frame))) + (when-let [relay-info (get-in @relays [url :relay-info])] + (let [html-doc (make-html-document + config/editor-pane-stylesheet + (str "

Name:

" (get relay-info "name") + "

Description:

" (get relay-info "description") + "

Pubkey:

" (get relay-info "pubkey") + "

Contact:

" (get relay-info "contact") + "

Software:

" (get relay-info "software") " V:" (get relay-info "version") + ) + ) + info-pane (editor-pane + :content-type "text/html" + :editable? false + :id :article-area + :text html-doc) + info-frame (frame :title (str "Relay info for " (relays/get-domain-name url)) + :content (scrollable info-pane) + :size [500 :by 600])] + (listen info-pane :hyperlink article-panel/open-link) + (pack! info-frame) + (show! info-frame)))) (defn make-relay-element ([url]