Skip to content

Commit

Permalink
Fix getFullInfo in certain conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
danog committed Apr 25, 2024
1 parent 85a829f commit 230dc3e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/TL/TL.php
Original file line number Diff line number Diff line change
Expand Up @@ -1026,10 +1026,12 @@ public function deserialize($stream, array $type)
$x['chat_id'] = -$x['chat_id'];
}
}
if (isset($x['migrated_from_chat_id'])) {
$x['migrated_from_chat_id'] = -$x['migrated_from_chat_id'];
}

if (isset($x['channel_id'])) {
$x['channel_id'] = Magic::ZERO_CHANNEL_ID - $x['channel_id'];
} elseif (isset($x['migrated_from_chat_id'])) {
$x['migrated_from_chat_id'] = -$x['migrated_from_chat_id'];
} elseif (isset($x['random_bytes'])) {
if (\strlen((string) $x['random_bytes']) < 15) {
throw new SecurityException('Random_bytes is too small!');
Expand Down

0 comments on commit 230dc3e

Please sign in to comment.