diff --git a/app/Profile.php b/app/Profile.php index 333cbb20..5dc6599e 100644 --- a/app/Profile.php +++ b/app/Profile.php @@ -275,10 +275,20 @@ class Profile extends Model ] ]; break; - - default: - # code... - break; } + return $audience; + } + + public function getAudienceInbox($scope = 'public') + { + return $this + ->followers() + ->whereLocalProfile(false) + ->get() + ->map(function($follow) { + return $follow->sharedInbox ?? $follow->inbox_url; + }) + ->unique() + ->toArray(); } }