Skip to content
This repository has been archived by the owner on Oct 27, 2021. It is now read-only.

Commit

Permalink
Merge pull request #57 from raboof/fix-processing-tweets-without-nitt…
Browse files Browse the repository at this point in the history
…er-rewrite

Fix processing tweets when nitter url rewriting is disabled
  • Loading branch information
yogthos committed Jul 11, 2020
2 parents e7b0ed2 + 8ed30c3 commit 2fbb143
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main/mastodon_bot/twitter_api.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand Down

0 comments on commit 2fbb143

Please sign in to comment.