1
0
mirror of https://github.com/danog/MadelineProto.git synced 2024-11-26 17:24:40 +01:00

Peer database bugfix

This commit is contained in:
Daniil Gentili 2024-10-19 15:03:50 +00:00
parent 96501b64f6
commit bcc493b7a5

View File

@ -265,7 +265,7 @@ final class PeerDatabase implements TLCallback
if (!$this->API->settings->getDb()->getEnableUsernameDb()) {
return;
}
$new = self::getUsernames($new);
$new = $new ? self::getUsernames($new) : [];
$old = $old ? self::getUsernames($old) : [];
$diffToRemove = array_diff($old, $new);
$diffToAdd = array_diff($new, $old);