From a0adf99dc3dbdd447955f202a681b0da2fc1e4b0 Mon Sep 17 00:00:00 2001 From: jem Date: Thu, 21 May 2020 12:42:51 +0200 Subject: [PATCH] fix chop --- src/main/mastodon_bot/twitter_api.cljs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/mastodon_bot/twitter_api.cljs b/src/main/mastodon_bot/twitter_api.cljs index 69c18ac..0a16526 100755 --- a/src/main/mastodon_bot/twitter_api.cljs +++ b/src/main/mastodon_bot/twitter_api.cljs @@ -33,6 +33,9 @@ (defn strip-utm [news-link] (first (string/split news-link #"\?utm"))) +(defn in [needle haystack] + (some (partial = needle) haystack)) + ; If the text ends in a link to the media (which is uploaded anyway), ; chop it off instead of including the link in the toot (defn chop-tail-media-url [text media]