Changed handlers for sent direct messages

This commit is contained in:
Manuel Cortez 2015-12-23 09:51:09 -06:00
parent 00a4203e1a
commit 78079e142f

View File

@ -87,11 +87,11 @@ class streamer(TwythonStreamer):
pub.sendMessage("mention", data=data, user=self.get_user())
def process_dm(self, data):
if self.session.db["user_name"] == data["direct_message"]["sender"]["screen_name"]:
d = self.put_data("sent_direct_messages", data["direct_message"])
if d != False:
pub.sendMessage("sent-dm", data=data["direct_message"], user=self.get_user())
else:
if self.session.db["user_name"] != data["direct_message"]["sender"]["screen_name"]:
# d = self.put_data("sent_direct_messages", data["direct_message"])
# if d != False:
# pub.sendMessage("sent-dm", data=data["direct_message"], user=self.get_user())
# else:
d = self.put_data("direct_messages", data["direct_message"])
if d != False:
pub.sendMessage("direct-message", data=data["direct_message"], user=self.get_user())