Update ap inbox

This commit is contained in:
Daniel Supernault 2022-12-29 04:06:21 -07:00
parent a1eb11b910
commit 3d1c2a4acf
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -307,10 +307,20 @@ class Inbox
{ {
$activity = $this->payload['object']; $activity = $this->payload['object'];
$actor = $this->actorFirstOrCreate($this->payload['actor']); $actor = $this->actorFirstOrCreate($this->payload['actor']);
if(!$actor) {
return;
}
$status = Helpers::statusFetch($activity['inReplyTo']); $status = Helpers::statusFetch($activity['inReplyTo']);
if(!$status) {
return;
}
$poll = $status->poll; $poll = $status->poll;
if(!$status || !$poll) { if(!$poll) {
return; return;
} }
@ -486,9 +496,14 @@ class Inbox
{ {
$actor = $this->actorFirstOrCreate($this->payload['actor']); $actor = $this->actorFirstOrCreate($this->payload['actor']);
$target = $this->actorFirstOrCreate($this->payload['object']); $target = $this->actorFirstOrCreate($this->payload['object']);
if(!$actor || $actor->domain == null || $target->domain !== null) { if(!$actor || !$target) {
return; return;
} }
if($actor->domain == null || $target->domain !== null) {
return;
}
if( if(
Follower::whereProfileId($actor->id) Follower::whereProfileId($actor->id)
->whereFollowingId($target->id) ->whereFollowingId($target->id)