Update Profile model

This commit is contained in:
Daniel Supernault 2018-11-13 19:16:59 -07:00
parent 11749bdc6a
commit 908740b46f
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -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();
}
}