fix: pre-new year bugfix

fixes #1204, fixes #1199
This commit is contained in:
mrilyew 2024-12-31 16:20:31 +03:00
parent 977da1f9c3
commit 46b12a7c8e
4 changed files with 6 additions and 4 deletions

View file

@ -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())

View file

@ -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)

View file

@ -900,7 +900,7 @@ tippy.delegate('body', {
that._likesList.items.forEach(item => {
final_template.find('.like_tooltip_body .like_tooltip_body_grid').append(`
<a href='/id${item.id}'><img src='${item.photo_50}' alt='.'></a>
<a title="${escapeHtml(item.first_name + " " + item.last_name)}" href='/id${item.id}'><img src='${item.photo_50}' alt='.'></a>
`)
})
that.setContent(final_template.nodes[0].outerHTML)

View file

@ -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"],