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
Operating system (including distribution name and version)
Windows 11
Other details
In situations where, when processing updates in the MessageBox.process_updates method, it is detected that self.seq + 1 < combined.seq_start, i.e. a signal that it is necessary to get the missed updates via getDifference, the request is just ignored, the missed updates aren't requested, and this leads to the fact that all subsequent incoming updates will also be ignored without firing any handlers.
At the same time, MessageBox implements methods for getting the difference, but they are not used anywhere. Therefore, as I understand it, you just haven't yet managed to implement this functionality.
In fact, I tried to fix this, but I don't understand what pattern you would stick to. It would be a separate task for asynchronous checking getting_diff_for/possible_gaps, or requesting the difference directly in process_socket_updates, or in client.py, or in net.py. However, it wouldn't work in process_socket_updates, because requesting inside asyncio.Lock leads to stuck. I'd like to know your opinion about this.
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
telethon/_impl/client/client/updates.py
Expected behavior
Invoke the
get_difference
method when required.Actual behavior
The
get_difference
method is never invoked.Traceback
No response
Telethon version
2
Python version
3.12
Operating system (including distribution name and version)
Windows 11
Other details
In situations where, when processing updates in the
MessageBox.process_updates
method, it is detected thatself.seq + 1 < combined.seq_start
, i.e. a signal that it is necessary to get the missed updates viagetDifference
, the request is just ignored, the missed updates aren't requested, and this leads to the fact that all subsequent incoming updates will also be ignored without firing any handlers.At the same time,
MessageBox
implements methods for getting the difference, but they are not used anywhere. Therefore, as I understand it, you just haven't yet managed to implement this functionality.In fact, I tried to fix this, but I don't understand what pattern you would stick to. It would be a separate task for asynchronous checking
getting_diff_for
/possible_gaps
, or requesting the difference directly inprocess_socket_updates
, or inclient.py
, or innet.py
. However, it wouldn't work inprocess_socket_updates
, because requesting insideasyncio.Lock
leads to stuck. I'd like to know your opinion about this.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: