Send XMPP error on unknown recipient

This commit is contained in:
2019-02-27 13:00:41 +01:00
parent 23b27c37c3
commit 2896126306

View File

@@ -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: