Sitelet https://web.archive.org/web/20200708010111/https://github.com/LonamiWebs/Telethon/issues/1327
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove misleading stringification #1327

Open
Lonami opened this issue Nov 9, 2019 · 0 comments
Open

Remove misleading stringification #1327

Lonami opened this issue Nov 9, 2019 · 0 comments

Comments

@Lonami
Copy link
Member

@Lonami Lonami commented Nov 9, 2019

Some people figure out the following…

await message.client.get_input_entity(message.original_update.channel_id))

…through event.stringify() (which contains original_update):

MessageDeleted.Event(
    original_update=UpdateDeleteMessages(
        messages=[
            123,
        ],
        pts=456,
        pts_count=1
    ),
    deleted_id=123,
    deleted_ids=[
        123,
    ]
)

This is of course awful, as they should instead be doing the following:

await message.get_input_chat()

(or even message.input_chat since now the library tries hard to always have the input chat).

So, changes to the way we represent certain things would be useful to avoid people from doing this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.