1
0
Fork 0
forked from mirror/pixelfed

Update ap inbox

This commit is contained in:
Daniel Supernault 2023-05-25 01:13:43 -06:00
parent 734136a7e7
commit aad4259a47
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7
2 changed files with 3 additions and 9 deletions

View file

@ -18,15 +18,13 @@ class StatusRemoteUpdatePipeline implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
public $actor;
public $activity;
/**
* Create a new job instance.
*/
public function __construct($actor, $activity)
public function __construct($activity)
{
$this->actor = $actor;
$this->activity = $activity;
}
@ -36,7 +34,7 @@ class StatusRemoteUpdatePipeline implements ShouldQueue
public function handle(): void
{
$activity = $this->activity;
$status = Status::with('media')->whereProfileId($this->actor['id'])->whereObjectUrl($activity['id'])->first();
$status = Status::with('media')->whereObjectUrl($activity['id'])->first();
if(!$status) {
return;
}

View file

@ -1212,10 +1212,6 @@ class Inbox
public function handleUpdateActivity()
{
$activity = $this->payload['object'];
$actor = $this->actorFirstOrCreate($this->payload['actor']);
if(!$actor || $actor->domain == null) {
return;
}
if(!isset($activity['type'], $activity['id'])) {
return;
@ -1223,7 +1219,7 @@ class Inbox
if($activity['type'] === 'Note') {
if(Status::whereObjectUrl($activity['id'])->exists()) {
StatusRemoteUpdatePipeline::dispatch($actor, $activity);
StatusRemoteUpdatePipeline::dispatch($activity);
}
}
}