This commit is contained in:
bom 2022-03-04 11:32:46 +01:00
parent 14dd5afe87
commit 84da12fa64

View file

@ -60,14 +60,12 @@
out)) out))
(defn favorited-replies? [host-url reply-id account-name] (defn favorited-replies? [host-url reply-id account-name]
(let [out (chan)] (go
(go (>! out (infra/debug (->>
(->> (<p! (api/get-favorited-by host-url reply-id))
(<p! (api/get-favorited-by host-url reply-id)) api/mastojs->edn
api/mastojs->edn (filter #(= account-name (:acct %)))
(filter #(= account-name (:acct %))) (infra/debug)))))
)))
out))
(defn init [] (defn init []
(go (go
@ -80,10 +78,11 @@
(<p! (api/get-account-statuses host-url account-id)) (<p! (api/get-account-statuses host-url account-id))
api/mastojs->edn) api/mastojs->edn)
test-status (-> test-status (->
(<p! (api/get-favorited-by host-url "107779492679907372")) (<p! (api/get-favorited-by host-url "107779739758156958"))
api/mastojs->edn) api/mastojs->edn)
filtered (filter #(go (<! (favorited-replies? host-url "107779739758156958" "bastian@digitalcourage.social"))) (:descendants test-status)) filtered (filter (favorited-replies? host-url "107779739758156958" "bastian@digitalcourage.social") (:descendants test-status))
] ]
;"107779739758156958"
;(->> statuus ;(->> statuus
; (take 4) ; (take 4)
; (rb/masto->html) ; (rb/masto->html)
@ -93,6 +92,7 @@
;(go (let [test (api/mastojs->edn (<p! (api/get-favorited-by host-url "107779739758156958")))] ;(go (let [test (api/mastojs->edn (<p! (api/get-favorited-by host-url "107779739758156958")))]
; (infra/debug (filter #(= "team@meissa.social" (:acct %)) test)))) ; (infra/debug (filter #(= "team@meissa.social" (:acct %)) test))))
(infra/debug test-status) (infra/debug test-status)
(infra/debug filtered)
;(->> filtered ;(->> filtered
; (infra/debug) ; (infra/debug)
; (rb/masto->html) ; (rb/masto->html)