Merge pull request #57 from raboof/fix-processing-tweets-without-nitter-rewrite

Fix processing tweets when nitter url rewriting is disabled
This commit is contained in:
Dmitri Sotnikov 2020-07-11 10:10:01 -04:00 committed by GitHub
commit 2fbb14333f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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?