Closed hikariatama closed 2 years ago
huh that's weird, can you create a small reproducible code maybe I can track it better that way,
huh that's weird, can you create a small reproducible code maybe I can track it better that way,
Mh, actually I'm one of the contributors to GeekTG userbot, this bug appeared with my module SecretChat (https://mods.hikariatama.ru/view/secret_chat.py), the Exception was thrown by independent from modules code with simple message.edit. I'll dive in a bit in next few days and comment here about result. As I think, secret_schema somehow affects classic one in the way that when you receive an update from telethon, standard message.entities is replaced with secret_schema entities.
The issue is in this line https://github.com/painor/telethon-secret-chat/blob/master/telethon_secret_chat/secret_chat_manager.py#L22
apparently some classes have the same constructor ID in both the normal TL schema and the secret TL schema so they get overridden.
An easy solution would be to update the dict with only constructors that are not in the normal TL schema already, If you think you can do this please open up a PR.
The issue is in this line https://github.com/painor/telethon-secret-chat/blob/master/telethon_secret_chat/secret_chat_manager.py#L22
apparently some classes have the same constructor ID in both the normal TL schema and the secret TL schema so they get overridden.
An easy solution would be to update the dict with only constructors that are not in the normal TL schema already, If you think you can do this please open up a PR.
I'm not geek in python actually 😅 I will try to do this, but not sure. If you just remove the constructors, wouldn't it cause the problems?
if you only remove the duplicate constructors it wouldn't cause an issue.
We only want to add constructors from this library that are not already in telethon.
if you only remove the duplicate constructors it wouldn't cause an issue.
We only want to add constructors from this library that are not already in telethon.
K, I'll try soon. Don't close the issue, please, in case we can chat and/or to update status of update
Ig this issue can be closed now, bc the PR with fixes is already in GH.
Traceback:
Error occured in classic functionality of https://github.com/GeekTG/Friendly-Telegram, to be exact, here: https://github.com/GeekTG/Friendly-Telegram/blob/master/friendly-telegram/dispatcher.py#L142
For more info, read this branch https://t.me/TelethonChat/429512