From d129a2ef19ec30b97f7f88f13f09effe4af1e9c6 Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Sat, 29 Jun 2024 11:19:55 +0200 Subject: [PATCH] Refresh on bot_info_version change --- src/MTProtoTools/PeerDatabase.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/MTProtoTools/PeerDatabase.php b/src/MTProtoTools/PeerDatabase.php index faaa0fe0c..34d2405b7 100644 --- a/src/MTProtoTools/PeerDatabase.php +++ b/src/MTProtoTools/PeerDatabase.php @@ -432,6 +432,9 @@ final class PeerDatabase implements TLCallback if ($existingChat && ($existingChat['min'] ?? false) && !($user['min'] ?? false)) { $this->API->minDatabase->clearPeer($user['id']); } + if ($existingChat && ($existingChat['bot_info_version'] ?? null) !== ($user['bot_info_version'] ?? null)) { + $this->expireFull($user['id']); + } } } finally { if (isset($o) && $this->pendingDb[$id] === $o) {