mirror of
https://github.com/danog/MadelineProto.git
synced 2024-11-26 23:14:38 +01:00
Fixes
This commit is contained in:
parent
50919a1611
commit
a0de3ebfde
@ -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();
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user