pull/3/head
bom 2 years ago
parent a1533bd452
commit 631a647255

@ -51,6 +51,16 @@
(str "statuses/" status-id "/context") (str "statuses/" status-id "/context")
#js {})) #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 (defn get-favorited-by
[host-url [host-url
status-id] status-id]

@ -66,9 +66,7 @@
(<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 %)))
(empty?) )))
(not)
(infra/debug))))
out)) out))
(defn init [] (defn init []
@ -82,21 +80,24 @@
(<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-replies host-url "107779492679907372")) (<p! (api/get-favorited-by host-url "107779492679907372"))
api/mastojs->edn) api/mastojs->edn)
filtered (->> filtered (filter #(go (<! (favorited-replies? host-url "107779739758156958" "bastian@digitalcourage.social"))) (:descendants test-status))
(:descendants test-status) ]
(filter #(favorited-replies? host-url (:id %) account-name))
(infra/debug))]
;(->> statuus ;(->> statuus
; (take 4) ; (take 4)
; (rb/masto->html) ; (rb/masto->html)
; (render-html) ; (render-html)
; (render-to-document)) ; (render-to-document))
(->> filtered ;(go (infra/debug (<! (favorited-replies? host-url "107779739758156958" "team@meissa.social"))))
(infra/debug) ;(go (let [test (api/mastojs->edn (<p! (api/get-favorited-by host-url "107779739758156958")))]
(rb/masto->html) ; (infra/debug (filter #(= "team@meissa.social" (:acct %)) test))))
(render-html) (infra/debug test-status)
(render-to-document))))) ;(->> filtered
; (infra/debug)
; (rb/masto->html)
; (render-html)
; (render-to-document))
)))

Loading…
Cancel
Save