Skip to content

Commit

Permalink
Update SharePipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
dansup committed Jul 30, 2023
1 parent 13bdaa2 commit 5a19daa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions app/Jobs/SharePipeline/SharePipeline.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@ public function __construct(Status $status)
public function handle()
{
$status = $this->status;
$parent = $this->status->parent();
$parent = Status::find($this->status->reblog_of_id);
if(!$parent) {
return;
}
$actor = $status->profile;
$target = $parent->profile;

Expand Down Expand Up @@ -84,7 +87,7 @@ public function handle()

public function remoteAnnounceDeliver()
{
if(config_cache('federation.activitypub.enabled') == false) {
if(config('app.env') !== 'production' || config_cache('federation.activitypub.enabled') == false) {
return true;
}
$status = $this->status;
Expand Down
2 changes: 1 addition & 1 deletion app/Jobs/SharePipeline/UndoSharePipeline.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public function handle()

public function remoteAnnounceDeliver()
{
if(config_cache('federation.activitypub.enabled') == false) {
if(config('app.env') !== 'production' || config_cache('federation.activitypub.enabled') == false) {
return 1;
}

Expand Down

0 comments on commit 5a19daa

Please sign in to comment.