From 9ff433155e7c29c6b35216df0cf5b567c851ef01 Mon Sep 17 00:00:00 2001 From: annelin Date: Sun, 13 Jan 2019 10:21:37 +0200 Subject: [PATCH] Fixed echo reply when getting XMPP messages with type = 'error' --- xmpp_tg/xmpp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xmpp_tg/xmpp.py b/xmpp_tg/xmpp.py index 96e9504..cd12bf2 100644 --- a/xmpp_tg/xmpp.py +++ b/xmpp_tg/xmpp.py @@ -108,7 +108,7 @@ class XMPPTelegram(ComponentXMPP): self.process_command(iq) else: 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 iq['body'].startswith('!'): # it is command! if iq['to'].bare.startswith( ('u', 'b') ):