1
0
Fork 0
forked from mirror/pixelfed

Update Status model, fixes #1637

This commit is contained in:
Daniel Supernault 2019-10-07 02:46:21 -06:00
parent ef77de4e05
commit c952442077
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -370,6 +370,13 @@ class Status extends Model
return $mention->permalink();
})->toArray();
if($status->in_reply_to_id != null) {
$parent = $status->parent();
if($parent) {
$mentions = array_merge([$parent->profile->permalink()], $mentions);
}
}
switch ($scope) {
case 'public':
$res['to'] = [
@ -379,18 +386,14 @@ class Status extends Model
break;
case 'unlisted':
$res['to'] = [
$this->profile->permalink('/followers')
];
$res['to'] = array_merge([$this->profile->permalink('/followers')], $mentions);
$res['cc'] = [
"https://www.w3.org/ns/activitystreams#Public"
];
break;
case 'private':
$res['to'] = [
$this->profile->permalink('/followers')
];
$res['to'] = array_merge([$this->profile->permalink('/followers')], $mentions);
$res['cc'] = [];
break;