contrib_bots: Switch encrypt bot to use send_reply.
MODIFY
contrib_bots/bots/encrypt/encrypt.py
contrib_bots/bots/encrypt/encrypt.py
@@ -30,20 +30,7 @@ class EncryptHandler(object):
def handle_message(self, message, client, state_handler):
bot_response = self.get_bot_encrypt_response(message)
-
- 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_encrypt_response(self, message):
original_content = message['content']

contrib_bots: Switch encrypt bot to use send_reply.