Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
danog committed Sep 26, 2024
1 parent 3c991dc commit d8fe777
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 @@ -315,7 +315,7 @@ public function getIdFromUsername(string $username): ?int
}
$result = $this->usernames[$username];
$id = $result === null ? $result : (int) $result;
if (!$this->isset($id)) {
if ($id !== null && !$this->isset($id)) {
$this->API->logger("No peer entry for cached username @$username => {$id}, dropping entry!");
unset($this->usernames[$username]);
return null;
Expand Down

0 comments on commit d8fe777

Please sign in to comment.