aboutsummaryrefslogtreecommitdiffhomepage
path: root/Digitigrade/Model/Note.php
diff options
context:
space:
mode:
Diffstat (limited to 'Digitigrade/Model/Note.php')
-rw-r--r--Digitigrade/Model/Note.php8
1 files changed, 6 insertions, 2 deletions
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 {