From c952442077caf4f8cef87e2980282f7599840ee0 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Mon, 7 Oct 2019 02:46:21 -0600 Subject: [PATCH] Update Status model, fixes #1637 --- app/Status.php | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/app/Status.php b/app/Status.php index a76d6dad7..94300f338 100644 --- a/app/Status.php +++ b/app/Status.php @@ -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;