I am using TLSharp and Telegram APIs to work around telegram my problem is when I am trying to get my dialog list using messages.getDialogs it doesnt return full list of my active dialogs it never gives the channels Ids and also it skips some other groups that I am joint in there for reasons that i dont know.
for example it returns about 20 chat IDs how ever i have about 25 groups and 15 channels but I never got the list of that chats. what is the method to get full list of dialogs including their chat_id and title?
I want to get a full list of my dialogs including channels and groups not user dialogs. I am giving this value offset = 0
, max_id = 0
, limit = 100
in messages.getDialogs method.
2
Answers
The idea behind offset and limit is to give you a sliding window.
You could typically start from say, offset = 0 and limit = 20 , then send another
messages.Dialogs
request with offset 20, limit = 20.Check each time if the number of items returned each time is less than 20, then you can stop requesting.
That pattern should work.
According to Telegram Api layer 52 (super groups and channels), Unfortunately current non-official implementations do not support greater layers (e.g. layer 52 so they don’t return channels and super groups).