From df051a7524a93f96bfc69924c202a51286517ce2 Mon Sep 17 00:00:00 2001 From: winter Date: Thu, 19 Dec 2024 22:59:40 +0000 Subject: let notes push themselves to interested parties --- Digitigrade/Model/FollowRelation.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'Digitigrade/Model/FollowRelation.php') diff --git a/Digitigrade/Model/FollowRelation.php b/Digitigrade/Model/FollowRelation.php index fc43a6f..0af9da5 100644 --- a/Digitigrade/Model/FollowRelation.php +++ b/Digitigrade/Model/FollowRelation.php @@ -34,4 +34,18 @@ class FollowRelation extends Model { public static function findByActors(Actor $subject, Actor $object): ?self { return self::findWhere('subject = ? and object = ?', [$subject->id, $object->id]); } + + /** + * @return self[] + */ + public static function findAllWithSubject(Actor $subject): array { + return self::findAllWhere('subject = ?', [$subject->id]); + } + + /** + * @return self[] + */ + public static function findAllWithObject(Actor $object): array { + return self::findAllWhere('object = ?', [$object->id]); + } } \ No newline at end of file -- cgit v1.3