mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-29 09:43:16 +00:00
Update ap inbox
This commit is contained in:
parent
734136a7e7
commit
aad4259a47
2 changed files with 3 additions and 9 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue