aboutsummaryrefslogtreecommitdiffhomepage
path: root/Digitigrade/Model
diff options
context:
space:
mode:
authorwinter2024-12-24 15:32:56 +0000
committerwinter2024-12-24 15:32:56 +0000
commitd5a57276eb27e215dd0b1bd5eb67ac26acc9575b (patch)
tree0cb3a14fa9a82d2438a7c12838f04ea12e02a9fa /Digitigrade/Model
parent01b7c47c68b8b3c5a9fd9137b067b34b566b951d (diff)
more stuff and things
Diffstat (limited to 'Digitigrade/Model')
-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 {