diff --git a/src/Db/DbArray.php b/src/Db/DbArray.php index 05c789276..e05af2106 100644 --- a/src/Db/DbArray.php +++ b/src/Db/DbArray.php @@ -24,7 +24,7 @@ use Traversable; * DB array interface. * * @psalm-type TOrmConfig=array{serializer?: SerializerType, enableCache?: bool, cacheTtl?: int, table?: string} - * + * * @template TKey as array-key * @template TValue * diff --git a/src/DocsBuilder/Constructors.php b/src/DocsBuilder/Constructors.php index 73a96fb56..85b9eae2b 100644 --- a/src/DocsBuilder/Constructors.php +++ b/src/DocsBuilder/Constructors.php @@ -69,6 +69,9 @@ trait Constructors if (\in_array($param['name'], ['flags', 'flags2', 'random_id', 'random_bytes'], true)) { continue; } + if ($param['name'] === 'peer' && $param['type'] === 'Peer') { + $param['type'] = 'long'; + } if ($type === 'EncryptedMessage' && $param['name'] === 'bytes' && !isset($this->settings['td'])) { $param['name'] = 'decrypted_message'; $param['type'] = 'DecryptedMessage'; diff --git a/src/TL/TL.php b/src/TL/TL.php index fbe740385..b856793c2 100644 --- a/src/TL/TL.php +++ b/src/TL/TL.php @@ -1063,8 +1063,9 @@ final class TL implements TLInterface $x = -$x['chat_id']; } elseif ($x['_'] === 'peerChannel') { $x = DialogId::toSupergroupOrChannel($x['channel_id']); + } else { + unset($x['flags'], $x['flags2']); } - unset($x['flags'], $x['flags2']); return $x; } }