From 6376ebd2c5256c02d7bc2821957f041d66b041bd Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Fri, 29 Sep 2023 22:22:50 +0200 Subject: [PATCH] Fixes --- docs | 2 +- examples/magnaluna | 2 +- src/MTProtoTools/Files.php | 2 +- src/TL/Conversion/BotAPI.php | 3 ++- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/docs b/docs index 5da30efc5..04a7377df 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit 5da30efc5233a9ef6e6804dd48cdd89170e56209 +Subproject commit 04a7377df9117e2a6c215ae78abf77b65df51558 diff --git a/examples/magnaluna b/examples/magnaluna index 32214a5ad..453cf521d 160000 --- a/examples/magnaluna +++ b/examples/magnaluna @@ -1 +1 @@ -Subproject commit 32214a5ad3aa7ffdf4cd7a1592b98990ca5a559b +Subproject commit 453cf521d71f99f21f84fff96651c744b0f99a34 diff --git a/src/MTProtoTools/Files.php b/src/MTProtoTools/Files.php index 79d470299..1b14d15d6 100644 --- a/src/MTProtoTools/Files.php +++ b/src/MTProtoTools/Files.php @@ -137,7 +137,7 @@ trait Files throw new AssertionError("has_document_photo === null: ".\json_encode($media['document'])); } - if ($attr['mask']) { + if ($attr['mask'] ?? false) { return new MaskSticker($this, $media, $attr, $has_document_photo, $protected); } diff --git a/src/TL/Conversion/BotAPI.php b/src/TL/Conversion/BotAPI.php index 4cec88f57..ecc4c9bee 100644 --- a/src/TL/Conversion/BotAPI.php +++ b/src/TL/Conversion/BotAPI.php @@ -304,6 +304,8 @@ trait BotAPI return $res; case 'messageMediaEmpty': return []; + case 'decryptedMessageMediaExternalDocument': + $data = ['document' => $document]; case 'messageMediaDocument': $type_name = 'document'; $res = []; @@ -391,7 +393,6 @@ trait BotAPI case 'decryptedMessageMediaAudio': case 'decryptedMessageMediaPhoto': case 'decryptedMessageMediaVideo': - case 'decryptedMessageMediaDocument': case 'decryptedMessageMediaDocument': $data = $data['file']; // no break