Send XMPP error on unknown recipient
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user