move filter to transform only

master
jem 4 years ago
parent 44b5bdb3bb
commit fc0e6eaede

@ -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)

@ -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?