From ea5d26e45573e986422f5f762718040a5303d17c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Qui=C3=B1ones?= Date: Sat, 18 Aug 2018 19:00:35 +0200 Subject: [PATCH] Display tweets with 280 characters If "extended" is not set, the default beheaviour is to give tweets with 140 characters. When it's enabled the response from the server doesn't have a "text" but a "full_text" ("text" comes empty). --- mastodon-bot.cljs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mastodon-bot.cljs b/mastodon-bot.cljs index 5d5b59d..1e1bfec 100755 --- a/mastodon-bot.cljs +++ b/mastodon-bot.cljs @@ -93,7 +93,7 @@ (post-status text)))) (defn parse-tweet [{created-at :created_at - text :text + text :full_text {:keys [media]} :extended_entities {:keys [screen_name]} :user :as tweet}] {:created-at (js/Date. created-at) @@ -146,7 +146,7 @@ (doseq [account (-> config :twitter :accounts)] (.get twitter-client "statuses/user_timeline" - #js {:screen_name account :include_rts false :exclude_replies true} + #js {:screen_name account :include_rts false :exclude_replies true :tweet_mode "extended"} (post-tweets last-post-time)))) ;;post from Tumblr (when-let [tumblr-oauth (some-> config :tumblr :access-keys clj->js)]