DM should not show ->name if you are the recipient.

This commit is contained in:
Robert C. Martin 2023-02-15 16:12:56 -06:00
parent b03f9016af
commit a1622c3498
3 changed files with 7 additions and 4 deletions

View File

@ -12,7 +12,8 @@
[org.bouncycastle/bcprov-jdk18on "1.72"]
[com.xtdb/xtdb-core "1.23.0"]
[com.xtdb/xtdb-rocksdb "1.23.0"]
[org.slf4j/slf4j-nop "1.7.30"]]
[org.slf4j/slf4j-nop "1.7.30"]
[clj-http "3.12.3"]]
:profiles {:dev {:dependencies [[speclj "3.4.1"]]}
:uberjar {:aot :all}}
:repositories {"local" {:url "file:lib" :username "" :password ""}}

View File

@ -127,7 +127,7 @@
(Thread/sleep (* 1000 seconds-to-wait)))
(prn 'reconnecting-to url)
(connect-to-relay relay)
(subscribe-to-relay url "more-speech-reconnect" date now))))
(subscribe-to-relay url (str config/subscription-id-base "-reconnect") date now))))
(defn connect-to-relays []
(doseq [url (keys @relays)]

View File

@ -91,8 +91,10 @@
(let [tags (:tags event)
ptags (filter #(= :p (first %)) tags)
to (util/unhexify (second (first ptags)))
to-name (format-user-id to)]
(str "🚫->" to-name " ")))
to-name (if (= to (get-mem :pubkey))
""
(str "-> " (format-user-id to)))]
(str "🚫" to-name " ")))
(defn format-header [{:keys [pubkey created-at tags] :as event}]
(if (nil? event)