Don't put a sent dm in the buffer right after the event has been sent

This commit is contained in:
Manuel Cortez 2018-08-06 11:37:46 -05:00
parent d94b133e63
commit 6893d923a3

View File

@ -585,14 +585,14 @@ class baseBufferController(bufferController):
} }
} }
} }
val = self.session.api_call(call_name="send_direct_message", **event_data) val = self.session.api_call(call_name="send_direct_message", _sound="dm_sent.ogg", **event_data)
if val != None: # if val != None:
if self.session.settings["general"]["reverse_timelines"] == False: # if self.session.settings["general"]["reverse_timelines"] == False:
self.session.db["direct_messages"]["items"].append(val["event"]) # self.session.db["direct_messages"]["items"].append(val["event"])
else: # else:
self.session.db["direct_messages"]["items"].insert(0, val["event"]) # self.session.db["direct_messages"]["items"].insert(0, val["event"])
pub.sendMessage("sent-dm", data=val["event"], user=self.session.db["user_name"]) # pub.sendMessage("sent-dm", data=val["event"], user=self.session.db["user_name"])
if hasattr(dm.message, "destroy"): dm.message.destroy() # if hasattr(dm.message, "destroy"): dm.message.destroy()
@_tweets_exist @_tweets_exist
def retweet(self, *args, **kwargs): def retweet(self, *args, **kwargs):