From 9c637db2ec4f2e682f90978907f1e06a0e0ac82b Mon Sep 17 00:00:00 2001 From: neiljp Date: Tue, 23 May 2017 16:29:27 -0700 Subject: [PATCH] bots: Switch define bot to use send_reply. --- contrib_bots/bots/define/define.py | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/contrib_bots/bots/define/define.py b/contrib_bots/bots/define/define.py index 88a7451..f2947ed 100644 --- a/contrib_bots/bots/define/define.py +++ b/contrib_bots/bots/define/define.py @@ -25,19 +25,7 @@ class DefineHandler(object): original_content = message['content'].strip() bot_response = self.get_bot_define_response(original_content) - if message['type'] == 'private': - client.send_message(dict( - type='private', - to=message['sender_email'], - content=bot_response, - )) - else: - client.send_message(dict( - type='stream', - to=message['display_recipient'], - subject=message['subject'], - content=bot_response, - )) + client.send_reply(message, bot_response) def get_bot_define_response(self, original_content): split_content = original_content.split(' ')