1
0
mirror of https://github.com/danog/MadelineProto.git synced 2024-11-26 23:14:38 +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()) { if (!$this->API->settings->getDb()->getEnableUsernameDb()) {
return; return;
} }
$new = self::getUsernames($new); $new = $new ? self::getUsernames($new) : [];
$old = $old ? self::getUsernames($old) : []; $old = $old ? self::getUsernames($old) : [];
$diffToRemove = array_diff($old, $new); $diffToRemove = array_diff($old, $new);
$diffToAdd = array_diff($new, $old); $diffToAdd = array_diff($new, $old);