Append intance url to creator's account if necessary

This commit is contained in:
arne 2023-10-04 12:02:45 +02:00
commit eadb7ba0e0

View file

@ -63,9 +63,11 @@
;; TODO: :location
[::xspf/trackList
(map (fn [status]
(let [file (audio-attachment status)]
(let [file (audio-attachment status)
acct (-> status :account :acct)]
[::xspf/track
[::xspf/creator (-> status :account :acct)]
[::xspf/creator (str acct (when-not (re-find #"@" acct)
(str "@" (.getHost (java.net.URL. (-> status :url))))))]
[::xspf/image (-> status :account :avatar)]
[::xspf/annotation (str (when (not= "" (:spoiler_text status))
(str (:spoiler_text status) "\n\n"))