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
{{ message }}
Repository navigation
query/dialogs: iterator fails when a page ends on dialogCommunity #1980
Can this issue be reproduced with the latest version?
Yes
What did you do?
Iterated dialogs with telegram/query/dialogs on an account whose dialog list has a dialogCommunity entry. Iteration breaks if a full page ends on that entry.
A clanker found this while working and i confirmed it manually.
In Iterator.apply (telegram/query/dialogs/iter.go:189-192) the next-page offset peer comes from the last dialog of the page:
dlgPeer, ok:=dialogPeer(dialogs[len(m.buf)-1])
if!ok {
returnerrors.Errorf("get offset peer: dialog %T has no peer", dialogs[len(m.buf)-1])
}
tg.DialogCommunity has no peer. The element loop at line 161 already skips peerless dialogs, but the cursor step doesn't.
What did you expect to see?
All dialogs listed. The community entry is skipped like it is elsewhere.
What did you see instead?
Iteration stops at the community entry with "get offset peer: dialog *tg.DialogCommunity has no peer". Nothing after it gets listed.
Activity