move filter to transform only

This commit is contained in:
jem 2020-06-08 19:59:34 +02:00
parent 44b5bdb3bb
commit fc0e6eaede
2 changed files with 4 additions and 7 deletions

View file

@ -93,11 +93,8 @@
(defn-spec post-items any?
[mastodon-auth mastodon-auth?
target mastodon-target?
last-post-time any?
items any?]
(doseq [{:keys [text media-links]}
(->> items
(filter #(> (:created-at %) last-post-time)))]
(doseq [{:keys [text media-links]} items]
(if media-links
(post-status-with-images mastodon-auth target text media-links)
(when-not (:media-only? target)

View file

@ -155,7 +155,7 @@
(map #(twitter/nitter-url source %))
(map #(perform-replacements transformation %))
(map #(intermediate-to-mastodon mastodon-auth target %))
(masto/post-items mastodon-auth target last-post-time))))))
(masto/post-items mastodon-auth target))))))
(defn-spec tweets-to-mastodon any?
[mastodon-auth masto/mastodon-auth?
@ -188,7 +188,7 @@
(remove #(blocked-content? transformation (:text %)))
(map #(perform-replacements transformation %))
(map #(intermediate-to-mastodon mastodon-auth target %))
(masto/post-items mastodon-auth target last-post-time))))))
(masto/post-items mastodon-auth target))))))
(defn-spec tumblr-to-mastodon any?
[mastodon-auth masto/mastodon-auth?
@ -221,7 +221,7 @@
(map #(intermediate-resolve-urls resolve-urls? %))
(map #(perform-replacements transformation %))
(map #(intermediate-to-mastodon mastodon-auth target %))
(masto/post-items mastodon-auth target last-post-time)))))
(masto/post-items mastodon-auth target)))))
(defn-spec rss-to-mastodon any?