From 908740b46f5c189081bb117f12a61dd8cf6a9575 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Tue, 13 Nov 2018 19:16:59 -0700 Subject: [PATCH] Update Profile model --- app/Profile.php | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/app/Profile.php b/app/Profile.php index 333cbb200..5dc6599ee 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(); } }