learned how to destruct namespaced keywords
This commit is contained in:
parent
f2a6f15c42
commit
418ff67282
1 changed files with 2 additions and 5 deletions
|
@ -112,10 +112,7 @@
|
||||||
([mastodon-config status-text media-ids]
|
([mastodon-config status-text media-ids]
|
||||||
(post-status mastodon-config status-text media-ids print))
|
(post-status mastodon-config status-text media-ids print))
|
||||||
([mastodon-config status-text media-ids callback]
|
([mastodon-config status-text media-ids callback]
|
||||||
(let [{:keys [sensitive? signature visibility]} mastodon-config]
|
(let [{:mastodon-bot.mastodon-api/keys [sensitive? signature visibility]} mastodon-config]
|
||||||
(println sensitive?)
|
|
||||||
(println signature)
|
|
||||||
(println visibility)
|
|
||||||
(-> (.post (mastodon-client mastodon-config) "statuses"
|
(-> (.post (mastodon-client mastodon-config) "statuses"
|
||||||
(clj->js (merge {:status (-> status-text
|
(clj->js (merge {:status (-> status-text
|
||||||
(partial resolve-urls mastodon-config)
|
(partial resolve-urls mastodon-config)
|
||||||
|
@ -162,7 +159,7 @@
|
||||||
[mastodon-config mastodon-config?
|
[mastodon-config mastodon-config?
|
||||||
last-post-time any?
|
last-post-time any?
|
||||||
items any?]
|
items any?]
|
||||||
(doseq [{:keys [text media-links]}
|
(doseq [{:mastodon-bot.mastodon-api/keys [text media-links]}
|
||||||
(->> items
|
(->> items
|
||||||
(remove #((blocked-content? mastodon-config (:text %))))
|
(remove #((blocked-content? mastodon-config (:text %))))
|
||||||
(filter #(> (:created-at %) last-post-time)))]
|
(filter #(> (:created-at %) last-post-time)))]
|
||||||
|
|
Reference in a new issue