From 3a465f231412a853265de56752955d24a3b1e7f6 Mon Sep 17 00:00:00 2001 From: Manuel Cortez Date: Tue, 7 Nov 2017 16:57:46 -0600 Subject: [PATCH] display extended retweets properly. Fixes #173 --- doc/changelog.md | 2 +- src/twitter/compose.py | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/doc/changelog.md b/doc/changelog.md index add945f0..ce20befe 100644 --- a/doc/changelog.md +++ b/doc/changelog.md @@ -6,7 +6,7 @@ * In the translator module, the list of available languages is fetched automatically from the provider. That means all of these languages will work and there will not be inconsistencies. Also we've removed the first combo box, because the language is detected automatically by Yandex'S API. ([#153](https://github.com/manuelcortez/TWBlue/issues/153)) * Trending topics, searches and conversation buffers will use mute settings set for the session in wich they were opened. ([#157](https://github.com/manuelcortez/TWBlue/issues/157)) * The Tweet limit is now 280 characters lenght instead 140. It means you can tweet longer tweets. ([#172](https://github.com/manuelcortez/TWBlue/issues/172)) -* And more. ([#156,](https://github.com/manuelcortez/TWBlue/issues/156) [#163,](https://github.com/manuelcortez/TWBlue/issues/163) [#159,](https://github.com/manuelcortez/TWBlue/issues/159)) +* And more. ([#156,](https://github.com/manuelcortez/TWBlue/issues/156) [#163,](https://github.com/manuelcortez/TWBlue/issues/163) [#159,](https://github.com/manuelcortez/TWBlue/issues/159) [#173,](https://github.com/manuelcortez/TWBlue/issues/173)) ## changes in version 0.91 and 0.92 diff --git a/src/twitter/compose.py b/src/twitter/compose.py index 7506c027..e326006c 100644 --- a/src/twitter/compose.py +++ b/src/twitter/compose.py @@ -44,8 +44,10 @@ def compose_tweet(tweet, db, relative_times, show_screen_names=False): value = "full_text" else: value = "text" -# log.exception(tweet.keys()) - text = StripChars(tweet[value]) + if tweet.has_key("retweeted_status") and value == "full_text": + text = StripChars(tweet["retweeted_status"][value]) + else: + text = StripChars(tweet[value]) if show_screen_names: user = tweet["user"]["screen_name"] else: