mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2024-11-26 20:53:13 -06:00
Send Tweets to mentions properly
This commit is contained in:
parent
5f11467f27
commit
9053fcd5de
@ -1640,7 +1640,7 @@ class Controller(object):
|
|||||||
if buffer == None or buffer.session.db["user_name"] != user: return
|
if buffer == None or buffer.session.db["user_name"] != user: return
|
||||||
buffer.add_new_item(data)
|
buffer.add_new_item(data)
|
||||||
if buff == "home_timeline": sound_to_play = "tweet_received.ogg"
|
if buff == "home_timeline": sound_to_play = "tweet_received.ogg"
|
||||||
elif buff == "mentions_timeline": sound_to_play = "mention_received.ogg"
|
elif buff == "mentions": sound_to_play = "mention_received.ogg"
|
||||||
elif buff == "sent_tweets": sound_to_play = "tweet_send.ogg"
|
elif buff == "sent_tweets": sound_to_play = "tweet_send.ogg"
|
||||||
elif "timeline" in buff: sound_to_play = "tweet_timeline.ogg"
|
elif "timeline" in buff: sound_to_play = "tweet_timeline.ogg"
|
||||||
else: sound_to_play = None
|
else: sound_to_play = None
|
||||||
|
@ -538,7 +538,7 @@ class Session(base.baseSession):
|
|||||||
buffers_to_send.append("sent_tweets")
|
buffers_to_send.append("sent_tweets")
|
||||||
for user in status.entities["user_mentions"]:
|
for user in status.entities["user_mentions"]:
|
||||||
if user["id"] == self.db["user_id"]:
|
if user["id"] == self.db["user_id"]:
|
||||||
buffers_to_send.append("mentions_timeline")
|
buffers_to_send.append("mentions")
|
||||||
users_with_timeline = [user.split("-")[0] for user in self.db.keys() if user.endswith("-timeline")]
|
users_with_timeline = [user.split("-")[0] for user in self.db.keys() if user.endswith("-timeline")]
|
||||||
for user in users_with_timeline:
|
for user in users_with_timeline:
|
||||||
if status.user.id_str == user:
|
if status.user.id_str == user:
|
||||||
|
Loading…
Reference in New Issue
Block a user