Telethon icon indicating copy to clipboard operation
Telethon copied to clipboard

ChatAction event return True for both new_pin and unpin

Open mannguyen0107 opened this issue 3 years ago • 1 comments

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

mannguyen0107 avatar Sep 05 '21 20:09 mannguyen0107

Also client.catch_up() do not fire ChatAction event for unpin messages.

mannguyen0107 avatar Sep 05 '21 20:09 mannguyen0107