You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@client.on(events.Album)
def first(e):
print(f"album events FIRST {event=}")
@client.on(events.Album)
def second(e):
print(f"album events SECOND {event=}")
Expected behavior
Process album once per handler.
Actual behavior
When I have only first handler it is ok:
$ album events FIRST event=<telethon.events.album.Album.Event object at 0x7f8b14d606d0>
but if I add the second first handler calls twice
$ album events FIRST event=<telethon.events.album.Album.Event object at 0x7fe79c6b4130>
$ album events SECOND event=<telethon.events.album.Album.Event object at 0x7fe79c6b4130>
$ album events FIRST event=<telethon.events.album.Album.Event object at 0x7fe79c6b4130>
Traceback
No response
Telethon version
1.33.1
Python version
3.10
Operating system (including distribution name and version)
Ubuntu 20.04
Other details
No response
Checklist
The error is in the library's code, and not in my own.
I have searched for this issue before posting it and there isn't an open duplicate.
I ran pip install -U https://github.com/LonamiWebs/Telethon/archive/v1.zip and triggered the bug in the latest version.
The text was updated successfully, but these errors were encountered:
Code that causes the issue
@client.on(events.Album)
def first(e):
print(f"album events FIRST {event=}")
@client.on(events.Album)
def second(e):
print(f"album events SECOND {event=}")
Expected behavior
Process album once per handler.
Actual behavior
When I have only first handler it is ok:
$ album events FIRST event=<telethon.events.album.Album.Event object at 0x7f8b14d606d0>
but if I add the second first handler calls twice
$ album events FIRST event=<telethon.events.album.Album.Event object at 0x7fe79c6b4130>
$ album events SECOND event=<telethon.events.album.Album.Event object at 0x7fe79c6b4130>
$ album events FIRST event=<telethon.events.album.Album.Event object at 0x7fe79c6b4130>
Traceback
No response
Telethon version
1.33.1
Python version
3.10
Operating system (including distribution name and version)
Ubuntu 20.04
Other details
No response
Checklist
pip install -U https://github.com/LonamiWebs/Telethon/archive/v1.zip
and triggered the bug in the latest version.The text was updated successfully, but these errors were encountered: