move filter to transform only
This commit is contained in:
parent
44b5bdb3bb
commit
fc0e6eaede
2 changed files with 4 additions and 7 deletions
|
@ -93,11 +93,8 @@
|
||||||
(defn-spec post-items any?
|
(defn-spec post-items any?
|
||||||
[mastodon-auth mastodon-auth?
|
[mastodon-auth mastodon-auth?
|
||||||
target mastodon-target?
|
target mastodon-target?
|
||||||
last-post-time any?
|
|
||||||
items any?]
|
items any?]
|
||||||
(doseq [{:keys [text media-links]}
|
(doseq [{:keys [text media-links]} items]
|
||||||
(->> items
|
|
||||||
(filter #(> (:created-at %) last-post-time)))]
|
|
||||||
(if media-links
|
(if media-links
|
||||||
(post-status-with-images mastodon-auth target text media-links)
|
(post-status-with-images mastodon-auth target text media-links)
|
||||||
(when-not (:media-only? target)
|
(when-not (:media-only? target)
|
||||||
|
|
|
@ -155,7 +155,7 @@
|
||||||
(map #(twitter/nitter-url source %))
|
(map #(twitter/nitter-url source %))
|
||||||
(map #(perform-replacements transformation %))
|
(map #(perform-replacements transformation %))
|
||||||
(map #(intermediate-to-mastodon mastodon-auth target %))
|
(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?
|
(defn-spec tweets-to-mastodon any?
|
||||||
[mastodon-auth masto/mastodon-auth?
|
[mastodon-auth masto/mastodon-auth?
|
||||||
|
@ -188,7 +188,7 @@
|
||||||
(remove #(blocked-content? transformation (:text %)))
|
(remove #(blocked-content? transformation (:text %)))
|
||||||
(map #(perform-replacements transformation %))
|
(map #(perform-replacements transformation %))
|
||||||
(map #(intermediate-to-mastodon mastodon-auth target %))
|
(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?
|
(defn-spec tumblr-to-mastodon any?
|
||||||
[mastodon-auth masto/mastodon-auth?
|
[mastodon-auth masto/mastodon-auth?
|
||||||
|
@ -221,7 +221,7 @@
|
||||||
(map #(intermediate-resolve-urls resolve-urls? %))
|
(map #(intermediate-resolve-urls resolve-urls? %))
|
||||||
(map #(perform-replacements transformation %))
|
(map #(perform-replacements transformation %))
|
||||||
(map #(intermediate-to-mastodon mastodon-auth target %))
|
(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?
|
(defn-spec rss-to-mastodon any?
|
||||||
|
|
Reference in a new issue