diff --git a/src/main/dda/masto_embed/api.cljs b/src/main/dda/masto_embed/api.cljs index 85354aa..4de34c9 100644 --- a/src/main/dda/masto_embed/api.cljs +++ b/src/main/dda/masto_embed/api.cljs @@ -51,6 +51,16 @@ (str "statuses/" status-id "/context") #js {})) +(defn get-filtered-replies + [host-url + status-id + account] + (->> (.get (mastodon-client host-url) + (str "statuses/" status-id "/context") + #js {}) + mastojs->edn + (:descendants))) + (defn get-favorited-by [host-url status-id] diff --git a/src/main/dda/masto_embed/app.cljs b/src/main/dda/masto_embed/app.cljs index 882cb14..3c15b9a 100644 --- a/src/main/dda/masto_embed/app.cljs +++ b/src/main/dda/masto_embed/app.cljs @@ -66,9 +66,7 @@ (
edn (filter #(= account-name (:acct %))) - (empty?) - (not) - (infra/debug)))) + ))) out)) (defn init [] @@ -82,21 +80,24 @@ (
edn) test-status (-> - (
edn) - filtered (->> - (:descendants test-status) - (filter #(favorited-replies? host-url (:id %) account-name)) - (infra/debug))] + filtered (filter #(go (> statuus ; (take 4) ; (rb/masto->html) ; (render-html) ; (render-to-document)) - (->> filtered - (infra/debug) - (rb/masto->html) - (render-html) - (render-to-document))))) + ;(go (infra/debug (edn (
> filtered + ; (infra/debug) + ; (rb/masto->html) + ; (render-html) + ; (render-to-document)) + )))