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