steavy29 / Telegram.Net

Telegram (http://telegram.org) client library implemented in C#.
17 stars 6 forks source link

how to complete list of chat with getdialogs??? #22

Closed Ansel1234S closed 7 years ago

Ansel1234S commented 7 years ago

how to complete list of chat with getdialogs???

steavy29 commented 7 years ago

Hi. Here is reference for this request https://core.telegram.org/method/messages.getDialogs As in description, you need to pass three parameters. If you need to fetch all available dialogs, then I think you need to use following values:

Here is some code:

telegramClient.GetDialogs(0 /*offset*/, -1 /*limit*/, 0 /*maxId, which is by default 0*/)

Is this what you need?

Ansel1234S commented 7 years ago

i use get dialog Method . My Telegram Account Has More Than 350 Groups,I want to get All Chats,But That's Method Can Not Give All Chat, sometimes Get 120 Chats, Sometimes 125 Chats, No more than 350 Chats, Please Example Method For Resolve My Problem. Thank you

steavy29 commented 7 years ago

Hm, interesting. Then I assume there is some limit of how many dialogs you can load in one request(though I haven't seen anything like this in documentation). I suggest you to load your dialogs in two requests using offset parameter. Unfortunately I can't try this on my own, because I don't an account with so many dialogs.

steavy29 commented 7 years ago

Closing the issue since there is no further feedback from the OP