From 69d0739ef155c7a959b1e7f361e42bf04533167e Mon Sep 17 00:00:00 2001 From: lalka2018 <99399973+lalka2016@users.noreply.github.com> Date: Sun, 20 Aug 2023 13:55:41 +0300 Subject: [PATCH] dghnryjtyj (#972) --- VKAPI/Handlers/Notes.php | 2 +- Web/Models/Entities/Note.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/VKAPI/Handlers/Notes.php b/VKAPI/Handlers/Notes.php index ce26baae..7c9c9fec 100644 --- a/VKAPI/Handlers/Notes.php +++ b/VKAPI/Handlers/Notes.php @@ -211,7 +211,7 @@ final class Notes extends VKAPIRequestHandler $items = []; $note = (new NotesRepo)->getNoteById((int)$id[0], (int)$id[1]); - if($note) { + if($note && !$note->isDeleted()) { $nodez->notes[] = $note->toVkApiStruct(); } } diff --git a/Web/Models/Entities/Note.php b/Web/Models/Entities/Note.php index 37d9ac29..83082bf3 100644 --- a/Web/Models/Entities/Note.php +++ b/Web/Models/Entities/Note.php @@ -124,7 +124,7 @@ class Note extends Postable $res = (object) []; $res->type = "note"; - $res->id = $this->getId(); + $res->id = $this->getVirtualId(); $res->owner_id = $this->getOwner()->getId(); $res->title = $this->getName(); $res->text = $this->getText();