From ef49472330b626da13640fb8b17b8cfb3ef04d99 Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Thu, 1 Jun 2017 19:12:18 +0200 Subject: [PATCH] Fixes for secret chat layers --- src/danog/MadelineProto/MTProto.php | 2 +- src/danog/MadelineProto/TL/TL.php | 4 ++-- src/danog/MadelineProto/TL_secret.tl | 4 ++++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/danog/MadelineProto/MTProto.php b/src/danog/MadelineProto/MTProto.php index 9c1ef62f..d114752c 100644 --- a/src/danog/MadelineProto/MTProto.php +++ b/src/danog/MadelineProto/MTProto.php @@ -717,7 +717,7 @@ class MTProto extends \Volatile public function getV() { - return 36; + return 37; } public function get_self() diff --git a/src/danog/MadelineProto/TL/TL.php b/src/danog/MadelineProto/TL/TL.php index fb9c9778..9fc6432c 100644 --- a/src/danog/MadelineProto/TL/TL.php +++ b/src/danog/MadelineProto/TL/TL.php @@ -544,7 +544,7 @@ trait TL $id = stream_get_contents($stream, 4); $constructorData = $this->constructors->find_by_id($id); if ($constructorData === false) { - throw new Exception('Could not extract type: '.$type['type'].' with id '.$id); + throw new Exception('Could not extract type: '.$type['type'].' with id '.bin2hex(strrev($id))); } switch ($constructorData['predicate']) { case 'gzip_packed': @@ -577,7 +577,7 @@ trait TL $id = stream_get_contents($stream, 4); $constructorData = $this->constructors->find_by_id($id); if ($constructorData === false) { - throw new Exception('Could not extract type: '.$type['type'].' with id '.$id); + throw new Exception('Could not extract type: '.$type['type'].' with id '.bin2hex(strrev($id))); } } } diff --git a/src/danog/MadelineProto/TL_secret.tl b/src/danog/MadelineProto/TL_secret.tl index 17d280aa..3e0c5c16 100644 --- a/src/danog/MadelineProto/TL_secret.tl +++ b/src/danog/MadelineProto/TL_secret.tl @@ -63,4 +63,8 @@ decryptedMessageMediaDocument#7afe8ae2 thumb:bytes thumb_w:int thumb_h:int mime_ ===46=== decryptedMessageMediaVenue#8a0df56f lat:double long:double title:string address:string provider:string venue_id:string = DecryptedMessageMedia; +documentAttributeAudio#ded218e0 duration:int title:string performer:string = DocumentAttribute; decryptedMessageMediaWebPage#e50511d8 url:string = DecryptedMessageMedia; + +===55=== +documentAttributeSticker#3a556302 alt:string stickerset:InputStickerSet = DocumentAttribute;