Nov-13-2021, 06:03 PM
Hi, with the following code i parse same telegram channels and just for messages that is interesting for me i forward them to my own other specific channel; monitored channels then has all marked as read whenever i new message is coming.
If I use request as python library to send message, it work well and message is not marked as read until i click on channel (telegram app) and read it.
Telethon client signed in as my telegram account. What I do is forwarding messages to my own channel. Is this a possible issue?
P.S. I am not using request to send message because I can only send text and not images that is present in forwarded messages.
client = TelegramClient(StringSession(session_token), api_id, api_hash)
client.start()
destination_group_invite_link='https://t.me/joinchat/XHFDSFDGFS'
destination=client.get_entity(destination_group_invite_link)
@client.on(events.NewMessage(chats=myChannelIDList))
async def my_event_handler(event):
rx = event.text.split()
for parola in rx:
if parola.lower() in paroleChiave:
await client.send_message(entity=destination, message=event.message, silent=False)
break
await client.send_read_acknowledge(event.chat_id)
client.run_until_disconnected()Issue is that using telethon send_message, message is marked as read in destination channel as well. It should not because it is not part of "myChannelIDList".If I use request as python library to send message, it work well and message is not marked as read until i click on channel (telegram app) and read it.
Telethon client signed in as my telegram account. What I do is forwarding messages to my own channel. Is this a possible issue?
P.S. I am not using request to send message because I can only send text and not images that is present in forwarded messages.
