From 2896126306be5be34a003b1828238f0125d74cc3 Mon Sep 17 00:00:00 2001 From: Yannik Enss Date: Wed, 27 Feb 2019 13:00:41 +0100 Subject: [PATCH] Send XMPP error on unknown recipient --- xmpp_tg/xmpp.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xmpp_tg/xmpp.py b/xmpp_tg/xmpp.py index 1e7a9c4..12f325c 100644 --- a/xmpp_tg/xmpp.py +++ b/xmpp_tg/xmpp.py @@ -153,6 +153,8 @@ class XMPPTelegram(ComponentXMPP): tg_peer = InputPeerChat(tg_id) elif iq['to'].bare.startswith( ('s', 'c') ): # supergroup tg_peer = InputPeerChannel(tg_id, self.tg_dialogs[jid]['supergroups'][tg_id].access_hash) + else: + raise XMPPError(text="Invalid Telegram-ID") # peer OK. if tg_peer: