Add more checks
This commit is contained in:
parent
4ac0d187d1
commit
d6c980315e
4
rias.py
4
rias.py
|
@ -131,7 +131,7 @@ async def main():
|
|||
fwd = await e.forward_to(receive_chat)
|
||||
if not fwd.forward or fwd.forward.sender_id != e.chat_id:
|
||||
user = await e.get_chat()
|
||||
await fwd.reply(f'Hidden User: <a href="tg://user?id={e.chat_id}">{html.escape(get_display_name(user))}</a> (<code>{e.chat_id}</code>,<code>{user.access_hash}</code>)')
|
||||
await fwd.reply(f'Hidden User: <a href="tg://user?id={e.chat_id}">{html.escape(get_display_name(user))}</a> (<code>{e.chat_id}</code>,<code>{user.access_hash}</code>)', link_preview=False)
|
||||
|
||||
@client.on(events.MessageEdited(func=lambda e: e.is_private))
|
||||
async def no_edits_handler(e):
|
||||
|
@ -145,7 +145,7 @@ async def main():
|
|||
return
|
||||
if reply.forward and reply.forward.sender_id:
|
||||
user = await reply.forward.get_input_sender()
|
||||
elif (match := hidden_fwd_regex.match(reply.raw_text)) and not reply.forward:
|
||||
elif (match := hidden_fwd_regex.match(reply.raw_text)) and not reply.forward and not reply.media:
|
||||
user = InputPeerUser(int(match.group(1)), int(match.group(2)))
|
||||
else:
|
||||
return
|
||||
|
|
Loading…
Reference in New Issue