From 8ed30c3057fb4a38c33ab0caf9b945974ae1a458 Mon Sep 17 00:00:00 2001 From: Arnout Engelen Date: Sat, 11 Jul 2020 11:56:27 +0200 Subject: [PATCH] Fix processing tweets when nitter url rewriting is disabled --- src/main/mastodon_bot/twitter_api.cljs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/mastodon_bot/twitter_api.cljs b/src/main/mastodon_bot/twitter_api.cljs index c3db2b1..c6d8564 100755 --- a/src/main/mastodon_bot/twitter_api.cljs +++ b/src/main/mastodon_bot/twitter_api.cljs @@ -54,8 +54,9 @@ (defn-spec nitter-url map? [source twitter-source? parsed-tweet map?] - (when (:nitter-urls? source) - (update parsed-tweet :text #(string/replace % #"https://twitter.com" "https://nitter.net")))) + (if (:nitter-urls? source) + (update parsed-tweet :text #(string/replace % #"https://twitter.com" "https://nitter.net")) + parsed-tweet)) (defn-spec user-timeline any? [twitter-auth twitter-auth?