mirror of
https://github.com/sochix/TLSharp.git
synced 2026-02-08 08:44:23 +01:00
Merge pull request #269 from aarani/patch-1
Change TLDialogs to TLAbsDialogs
This commit is contained in:
commit
263685f050
|
|
@ -196,10 +196,10 @@ namespace TLSharp.Core
|
||||||
return await SendRequestAsync<Boolean>(req);
|
return await SendRequestAsync<Boolean>(req);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<TLDialogs> GetUserDialogsAsync()
|
public async Task<TLAbsDialogs> GetUserDialogsAsync()
|
||||||
{
|
{
|
||||||
var peer = new TLInputPeerSelf();
|
var peer = new TLInputPeerSelf();
|
||||||
return await SendRequestAsync<TLDialogs>(
|
return await SendRequestAsync<TLAbsDialogs>(
|
||||||
new TLRequestGetDialogs() { offset_date = 0, offset_peer = peer, limit = 100 });
|
new TLRequestGetDialogs() { offset_date = 0, offset_peer = peer, limit = 100 });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -141,7 +141,7 @@ namespace TLSharp.Tests
|
||||||
|
|
||||||
await client.ConnectAsync();
|
await client.ConnectAsync();
|
||||||
|
|
||||||
var dialogs = await client.GetUserDialogsAsync();
|
var dialogs = (TLDialogs) await client.GetUserDialogsAsync();
|
||||||
var chat = dialogs.chats.lists
|
var chat = dialogs.chats.lists
|
||||||
.Where(c => c.GetType() == typeof(TLChannel))
|
.Where(c => c.GetType() == typeof(TLChannel))
|
||||||
.Cast<TLChannel>()
|
.Cast<TLChannel>()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue