diff options
Diffstat (limited to 'Digitigrade/Model/Note.php')
| -rw-r--r-- | Digitigrade/Model/Note.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Digitigrade/Model/Note.php b/Digitigrade/Model/Note.php index cf23e80..0aa29bd 100644 --- a/Digitigrade/Model/Note.php +++ b/Digitigrade/Model/Note.php @@ -111,6 +111,10 @@ class Note extends PushableModel implements TimelineIncludeable { return self::findAllWhere($where, [$author->id], $limit, $offset, 'created DESC'); } + public static function countWithAuthor(Actor $author): int { + return self::countWhere('author = ? AND deleted = false', [$author->id]); + } + public static function findAllInThread(Note $threadApex, ?int $limit = null, int $offset = 0): array { if (isset($limit)) $limit--; // to account for adding the note afterwards |
