From eadb7ba0e0dfbf1e42456919667500d4922a329c Mon Sep 17 00:00:00 2001 From: arne Date: Wed, 4 Oct 2023 12:02:45 +0200 Subject: [PATCH] Append intance url to creator's account if necessary --- looptober.clj | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/looptober.clj b/looptober.clj index 3198e48..1004551 100644 --- a/looptober.clj +++ b/looptober.clj @@ -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"))