contrib_bots: Switch encrypt bot to use send_reply.
This commit is contained in:
parent
9c637db2ec
commit
ec0de2a7ff
|
@ -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']
|
||||
|
|
Loading…
Reference in a new issue