From b9687b1fb28cf45db01813ba83d659d7ac045ae5 Mon Sep 17 00:00:00 2001 From: mrilyew <99399973+mrilyew@users.noreply.github.com> Date: Tue, 19 Nov 2024 16:39:05 +0300 Subject: [PATCH] fix(api): do not go online on every call --- Web/Presenters/OpenVKPresenter.php | 2 +- Web/Presenters/VKAPIPresenter.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Web/Presenters/OpenVKPresenter.php b/Web/Presenters/OpenVKPresenter.php index a5a76011..0e861a7b 100644 --- a/Web/Presenters/OpenVKPresenter.php +++ b/Web/Presenters/OpenVKPresenter.php @@ -256,7 +256,7 @@ abstract class OpenVKPresenter extends SimplePresenter $userValidated = 1; $cacheTime = 0; # Force no cache - if($this->user->identity->onlineStatus() == 0 && !($this->user->identity->isDeleted() || $this->user->identity->isBanned())) { + if(!property_exists($this, 'silent') && $this->user->identity->onlineStatus() == 0 && !($this->user->identity->isDeleted() || $this->user->identity->isBanned())) { $this->user->identity->setOnline(time()); $this->user->identity->setClient_name(NULL); $this->user->identity->save(false); diff --git a/Web/Presenters/VKAPIPresenter.php b/Web/Presenters/VKAPIPresenter.php index e7a5a42f..fd283321 100644 --- a/Web/Presenters/VKAPIPresenter.php +++ b/Web/Presenters/VKAPIPresenter.php @@ -10,6 +10,7 @@ use WhichBrowser; final class VKAPIPresenter extends OpenVKPresenter { + protected $silent = true; private function logRequest(string $object, string $method): void { $date = date(DATE_COOKIE);