diff --git a/src/main/dda/masto_embed/app.cljs b/src/main/dda/masto_embed/app.cljs index e0afcf9..f0cf6fb 100644 --- a/src/main/dda/masto_embed/app.cljs +++ b/src/main/dda/masto_embed/app.cljs @@ -59,13 +59,30 @@ first))) out)) -(defn favorited-replies? [host-url reply-id account-name] - (go - (infra/debug (->> - (edn - (filter #(= account-name (:acct %))) - (infra/debug))))) +(defn favorited-replies? [host-url account-name reply-id] + (let [out (chan)] + (go + (>! out + (->> + (edn + (filter #(= account-name (:acct %))) + (empty?) + (not)))) + out)) + +(defn favorited? [host-url account-name replies] + (let [out (chan)] + (go + (>! out + (loop [loc-replies replies + result []] + (if (empty? loc-replies) + result + (recur (rest loc-replies) + (conj result (edn) test-status (-> - (edn) - filtered (filter (favorited-replies? host-url "107779739758156958" "bastian@digitalcourage.social") (:descendants test-status)) + favorited (> statuus ; (take 4) ; (rb/masto->html) ; (render-html) ; (render-to-document)) - ;(go (infra/debug (edn (> filtered - ; (infra/debug) - ; (rb/masto->html) - ; (render-html) - ; (render-to-document)) - ))) - - + (->> filtered + (infra/debug) + (rb/masto->html) + (render-html) + (render-to-document)) + ))) \ No newline at end of file