From f07e40392d1cfb88d24e1ceaadfeeacd7e82bddd Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Sun, 21 Apr 2024 14:45:27 +0200 Subject: [PATCH] Improvement --- src/MTProtoTools/PeerDatabase.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/MTProtoTools/PeerDatabase.php b/src/MTProtoTools/PeerDatabase.php index 6b68e9759..f64e46b2f 100644 --- a/src/MTProtoTools/PeerDatabase.php +++ b/src/MTProtoTools/PeerDatabase.php @@ -153,7 +153,11 @@ final class PeerDatabase implements TLCallback public function getFull(int $id): ?array { - return $this->fullDb[$id]; + $result = $this->fullDb[$id]; + if ($result !== null) { + $result['id'] = $id; + } + return $result; } public function expireFull(int $id): void {