mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2025-01-31 05:10:45 -06:00
Avoid putting sent dm's in the buffer as they are different to the new ones #215
This commit is contained in:
parent
41582a3770
commit
7b5e6477d3
@ -571,12 +571,13 @@ class baseBufferController(bufferController):
|
|||||||
dm = messages.dm(self.session, _(u"Direct message to %s") % (screen_name,), _(u"New direct message"), users)
|
dm = messages.dm(self.session, _(u"Direct message to %s") % (screen_name,), _(u"New direct message"), users)
|
||||||
if dm.message.get_response() == widgetUtils.OK:
|
if dm.message.get_response() == widgetUtils.OK:
|
||||||
val = self.session.api_call(call_name="send_direct_message", text=dm.message.get_text(), screen_name=dm.message.get("cb"))
|
val = self.session.api_call(call_name="send_direct_message", text=dm.message.get_text(), screen_name=dm.message.get("cb"))
|
||||||
if val != None:
|
# let's avoid this for now as sent dm's are quite different to new dm objects.
|
||||||
if self.session.settings["general"]["reverse_timelines"] == False:
|
# if val != None:
|
||||||
self.session.db["sent_direct_messages"].append(val)
|
# if self.session.settings["general"]["reverse_timelines"] == False:
|
||||||
else:
|
# self.session.db["sent_direct_messages"].append(val)
|
||||||
self.session.db["sent_direct_messages"].insert(0, val)
|
# else:
|
||||||
pub.sendMessage("sent-dm", data=val, user=self.session.db["user_name"])
|
# self.session.db["sent_direct_messages"].insert(0, val)
|
||||||
|
# pub.sendMessage("sent-dm", data=val, 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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user