From 46b12a7c8ec76cf80f44b2802006bbe8fb31f2e9 Mon Sep 17 00:00:00 2001 From: mrilyew <99399973+mrilyew@users.noreply.github.com> Date: Tue, 31 Dec 2024 16:20:31 +0300 Subject: [PATCH] fix: pre-new year bugfix fixes #1204, fixes #1199 --- VKAPI/Handlers/Account.php | 2 +- Web/Presenters/UserPresenter.php | 2 +- Web/static/js/al_wall.js | 2 +- themepacks/midnight/stylesheet.css | 4 +++- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/VKAPI/Handlers/Account.php b/VKAPI/Handlers/Account.php index d4144b90..7f837f66 100644 --- a/VKAPI/Handlers/Account.php +++ b/VKAPI/Handlers/Account.php @@ -212,7 +212,7 @@ final class Account extends VKAPIRequestHandler $this->fail(-252, "Not enough votes"); $receiver_entity = (new \openvk\Web\Models\Repositories\Users)->get($receiver); - if(!$receiver_entity || $receiver_entity->isDeleted()) + if(!$receiver_entity || $receiver_entity->isDeleted() || !$receiver_entity->canBeViewedBy($this->getUser())) $this->fail(-250, "Invalid receiver"); if($receiver_entity->getId() === $this->getUser()->getId()) diff --git a/Web/Presenters/UserPresenter.php b/Web/Presenters/UserPresenter.php index dc8fb02c..abaef4e0 100644 --- a/Web/Presenters/UserPresenter.php +++ b/Web/Presenters/UserPresenter.php @@ -792,7 +792,7 @@ final class UserPresenter extends OpenVKPresenter $this->flashFail("err", tr("failed_to_tranfer_points"), tr("message_is_too_long")); $receiver = $this->users->getByAddress($receiverAddress); - if(!$receiver) + if(!$receiver || !$receiver->canBeViewedBy($this->user->identity)) $this->flashFail("err", tr("failed_to_tranfer_points"), tr("receiver_not_found")); if($this->user->identity->getCoins() < $value) diff --git a/Web/static/js/al_wall.js b/Web/static/js/al_wall.js index e6229b28..c48440e6 100644 --- a/Web/static/js/al_wall.js +++ b/Web/static/js/al_wall.js @@ -900,7 +900,7 @@ tippy.delegate('body', { that._likesList.items.forEach(item => { final_template.find('.like_tooltip_body .like_tooltip_body_grid').append(` - . + . `) }) that.setContent(final_template.nodes[0].outerHTML) diff --git a/themepacks/midnight/stylesheet.css b/themepacks/midnight/stylesheet.css index 7890d6b1..42ceb921 100644 --- a/themepacks/midnight/stylesheet.css +++ b/themepacks/midnight/stylesheet.css @@ -118,7 +118,8 @@ center[style="background: white;border: #DEDEDE solid 1px;"], tr, td, th, -#votesBalance, +#votesBalance, +#news, .paginator a.active, .paginator a:hover, .topic-list-item, @@ -312,6 +313,7 @@ tr.e, td.v, tr.v, #votesBalance, +#news, .expand_button, #userContent blockquote, .tippy-box[data-theme~="vk"],