mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2024-11-22 19:28:09 -06:00
Fixed extended retweets in Streaming API. Closes #174
This commit is contained in:
parent
68ea029fe3
commit
ed7c9802d1
@ -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) [#173,](https://github.com/manuelcortez/TWBlue/issues/173))
|
||||
* 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) [#174,](https://github.com/manuelcortez/TWBlue/issues/174))
|
||||
|
||||
## changes in version 0.91 and 0.92
|
||||
|
||||
|
@ -60,12 +60,12 @@ class timelinesStreamer(TwythonStreamer):
|
||||
self.friends = friends
|
||||
|
||||
def on_success(self, data):
|
||||
# try:
|
||||
if "text" in data and utils.is_allowed(data, self.session.settings["twitter"]["ignored_clients"]) == True:
|
||||
if data.has_key("extended_tweet"):
|
||||
data["full_text"] = data["extended_tweet"]["full_text"]
|
||||
# data["entities"] = data["extended_tweet"]["entities"]
|
||||
# log.error(data["extended_entities"])
|
||||
if data.has_key("retweeted_status"):
|
||||
if data["retweeted_status"].has_key("extended_tweet"):
|
||||
data["retweeted_status"]["full_text"] = data["retweeted_status"]["extended_tweet"]["full_text"]
|
||||
data["full_text"] = data["text"]
|
||||
data["retweeted_status"]["entities"] = data["retweeted_status"]["extended_tweet"]["entities"]
|
||||
self.check_tls(data)
|
||||
# except:
|
||||
# pass
|
||||
|
@ -132,8 +132,11 @@ class streamer(TwythonStreamer):
|
||||
if data.has_key("extended_tweet"):
|
||||
data["full_text"] = data["extended_tweet"]["full_text"]
|
||||
data["entities"] = data["extended_tweet"]["entities"]
|
||||
# log.error(data["extended_tweet"])
|
||||
# log.error("Extended tweet")
|
||||
if data.has_key("retweeted_status"):
|
||||
if data["retweeted_status"].has_key("extended_tweet"):
|
||||
data["retweeted_status"]["full_text"] = data["retweeted_status"]["extended_tweet"]["full_text"]
|
||||
data["full_text"] = data["text"]
|
||||
data["retweeted_status"]["entities"] = data["retweeted_status"]["extended_tweet"]["entities"]
|
||||
if data["user"]["id"] in self.muted_users: return
|
||||
self.check_mentions(data)
|
||||
self.check_send(data)
|
||||
|
Loading…
Reference in New Issue
Block a user