mirror of
https://github.com/sochix/TLSharp.git
synced 2026-04-05 14:37:04 +00:00
Fix issues with GetDialogs
Default value of max_id = 0 returns all dialogs Should return a class with lists of dialog, messages, chats and users. Add UserForeignConstructor to list of constructors Add missing detail to DialogConstructor (PeerNotifySettings) Unpack datastream completely to avoid issue with Ionic exception causing problems in userForeign parsing Use more recent code for Dialog construction
This commit is contained in:
parent
b869a4f617
commit
8026bd79dc
4 changed files with 43 additions and 14 deletions
|
|
@ -250,13 +250,19 @@ namespace TLSharp.Core
|
|||
return Tuple.Create(request.type, request.bytes);
|
||||
}
|
||||
|
||||
public async Task<List<Dialog>> GetDialogs(int offset, int limit, int max_id = -1)
|
||||
public async Task<MessageDialogs> GetDialogs(int offset, int limit, int max_id = 0)
|
||||
{
|
||||
var request = new GetDialogsRequest(offset, max_id, limit);
|
||||
await _sender.Send(request);
|
||||
await _sender.Recieve(request);
|
||||
|
||||
return request.dialogs;
|
||||
return new MessageDialogs
|
||||
{
|
||||
Dialogs = request.dialogs,
|
||||
Messages = request.messages,
|
||||
Chats = request.chats,
|
||||
Users = request.users,
|
||||
};
|
||||
}
|
||||
|
||||
public async Task<UserFull> GetUserFull(int user_id)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue