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: