Skip to content

Commit

Permalink
Peer database bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
danog committed Oct 19, 2024
1 parent 96501b6 commit bcc493b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/MTProtoTools/PeerDatabase.php
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ private function recacheChatUsername(int $id, ?array $old, array $new): void
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);
Expand Down

0 comments on commit bcc493b

Please sign in to comment.