mirror of
https://github.com/sochix/TLSharp.git
synced 2026-04-05 06:26:44 +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
|
|
@ -295,11 +295,18 @@ namespace TLSharp.Core.Network
|
|||
{
|
||||
// gzip_packed
|
||||
byte[] packedData = Serializers.Bytes.read(messageReader);
|
||||
using (var packedStream = new MemoryStream(packedData, false))
|
||||
using (var zipStream = new GZipStream(packedStream, CompressionMode.Decompress))
|
||||
using (var compressedReader = new BinaryReader(zipStream))
|
||||
using (var ms = new MemoryStream())
|
||||
{
|
||||
request.OnResponse(compressedReader);
|
||||
using (var packedStream = new MemoryStream(packedData, false))
|
||||
using (var zipStream = new GZipStream(packedStream, CompressionMode.Decompress))
|
||||
{
|
||||
zipStream.CopyTo(ms);
|
||||
ms.Position = 0;
|
||||
}
|
||||
using (var compressedReader = new BinaryReader(ms))
|
||||
{
|
||||
request.OnResponse(compressedReader);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (ZlibException ex)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue