diff --git a/src/MTProtoTools/PeerDatabase.php b/src/MTProtoTools/PeerDatabase.php index 8f0351c54..0ae29a501 100644 --- a/src/MTProtoTools/PeerDatabase.php +++ b/src/MTProtoTools/PeerDatabase.php @@ -130,7 +130,13 @@ final class PeerDatabase implements TLCallback ValueType::SCALAR ); $old = $old->build(); + $kk = 0; + $total = count($old); foreach ($old as $k => $v) { + $kk++; + if ($kk % 500 === 0 || $kk === $total) { + $this->API->logger("Migrating username database ($kk/$total)..."); + } $this->usernames[$k] = $v; } $old->clear(); diff --git a/src/TL/Conversion/BotAPIFiles.php b/src/TL/Conversion/BotAPIFiles.php index c83396b2a..cbb17d861 100644 --- a/src/TL/Conversion/BotAPIFiles.php +++ b/src/TL/Conversion/BotAPIFiles.php @@ -45,8 +45,8 @@ trait BotAPIFiles type: $photo['_'] === 'photo' ? FileIdType::PHOTO : FileIdType::THUMBNAIL, accessHash: $photo['access_hash'] ?? 0, fileReference: $photo['file_reference'] === null - ? null - : (string) $photo['file_reference'], + ? null + : (string) $photo['file_reference'], dcId: $photo['dc_id'] ?? 0, localId: $photoSize['location']['local_id'] ?? null, volumeId: $photoSize['location']['volume_id'] ?? null,