Fixed echo reply when getting XMPP messages with type = 'error'

This commit is contained in:
annelin
2019-01-13 10:21:37 +02:00
parent 5381c49daf
commit 9ff433155e

View File

@@ -108,7 +108,7 @@ class XMPPTelegram(ComponentXMPP):
self.process_command(iq) self.process_command(iq)
else: else:
self.gate_reply_message(iq, 'Only commands accepted. Try !help for more info.') self.gate_reply_message(iq, 'Only commands accepted. Try !help for more info.')
else: # --- outgoing message --- elif iq['type'] == 'chat': # --- outgoing message ---
if jid in self.tg_connections and self.tg_connections[jid].is_user_authorized(): if jid in self.tg_connections and self.tg_connections[jid].is_user_authorized():
if iq['body'].startswith('!'): # it is command! if iq['body'].startswith('!'): # it is command!
if iq['to'].bare.startswith( ('u', 'b') ): if iq['to'].bare.startswith( ('u', 'b') ):