Fix processing tweets when nitter url rewriting is disabled

This commit is contained in:
Arnout Engelen 2020-07-11 11:56:27 +02:00
parent e7b0ed233e
commit 8ed30c3057
No known key found for this signature in database
GPG key ID: 061107B0F74A6DAA

View file

@ -54,8 +54,9 @@
(defn-spec nitter-url map? (defn-spec nitter-url map?
[source twitter-source? [source twitter-source?
parsed-tweet map?] parsed-tweet map?]
(when (:nitter-urls? source) (if (:nitter-urls? source)
(update parsed-tweet :text #(string/replace % #"https://twitter.com" "https://nitter.net")))) (update parsed-tweet :text #(string/replace % #"https://twitter.com" "https://nitter.net"))
parsed-tweet))
(defn-spec user-timeline any? (defn-spec user-timeline any?
[twitter-auth twitter-auth? [twitter-auth twitter-auth?