Telethon
Telethon copied to clipboard
ChatAction event return True for both new_pin and unpin
Checklist
- [ x] The error is in the library's code, and not in my own.
- [ x] I have searched for this issue before posting it and there isn't a duplicate.
- [ ] I ran
pip install -U https://github.com/LonamiWebs/Telethon/archive/master.zip
and triggered the bug in the latest version.
In my code I have added event handler for ChatAction. I notice that that when a message get pinned the event did return new_pin is True however when the same message get unpin the event that returned have both new_pin and unpin True. This make it very difficult to handle pin and unpin event.
A work around that I'm doing is I check when the event is unpin the action_message will be None but this is very hacking and required a few other call to get the message back to handle unpin
Also client.catch_up() do not fire ChatAction event for unpin messages.