From d5a57276eb27e215dd0b1bd5eb67ac26acc9575b Mon Sep 17 00:00:00 2001 From: winter Date: Tue, 24 Dec 2024 15:32:56 +0000 Subject: more stuff and things --- Digitigrade/Model/Note.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'Digitigrade/Model') diff --git a/Digitigrade/Model/Note.php b/Digitigrade/Model/Note.php index 3c0c690..bc8b39b 100644 --- a/Digitigrade/Model/Note.php +++ b/Digitigrade/Model/Note.php @@ -102,8 +102,12 @@ class Note extends PushableModel { return $actors; } - public static function findAllWithAuthor(Actor $author, ?int $limit = null, int $offset = 0): array { - return self::findAllWhere('author = ?', [$author->id], $limit, $offset, 'created DESC'); + public static function findAllWithAuthor(Actor $author, ?int $limit = null, int $offset = 0, bool $includeDeleted = false): array { + $where = 'author = ?'; + if (!$includeDeleted) { + $where .= ' AND deleted = false'; + } + return self::findAllWhere($where, [$author->id], $limit, $offset, 'created DESC'); } public function getInteractions(): array { -- cgit v1.3