Update SharePipeline

This commit is contained in:
Daniel Supernault 2023-07-30 05:45:14 -06:00
parent 13bdaa2ed4
commit 5a19daabce
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7
2 changed files with 6 additions and 3 deletions

View file

@ -49,7 +49,10 @@ class SharePipeline implements ShouldQueue
public function handle() public function handle()
{ {
$status = $this->status; $status = $this->status;
$parent = $this->status->parent(); $parent = Status::find($this->status->reblog_of_id);
if(!$parent) {
return;
}
$actor = $status->profile; $actor = $status->profile;
$target = $parent->profile; $target = $parent->profile;
@ -84,7 +87,7 @@ class SharePipeline implements ShouldQueue
public function remoteAnnounceDeliver() public function remoteAnnounceDeliver()
{ {
if(config_cache('federation.activitypub.enabled') == false) { if(config('app.env') !== 'production' || config_cache('federation.activitypub.enabled') == false) {
return true; return true;
} }
$status = $this->status; $status = $this->status;

View file

@ -70,7 +70,7 @@ class UndoSharePipeline implements ShouldQueue
public function remoteAnnounceDeliver() public function remoteAnnounceDeliver()
{ {
if(config_cache('federation.activitypub.enabled') == false) { if(config('app.env') !== 'production' || config_cache('federation.activitypub.enabled') == false) {
return 1; return 1;
} }