From d660e46b222bb53b747f77d75ee2bcfb2f88bd24 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Thu, 17 Nov 2022 20:49:00 -0700 Subject: [PATCH] Update Inbox, fix handleUndoActivity --- app/Util/ActivityPub/Inbox.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/Util/ActivityPub/Inbox.php b/app/Util/ActivityPub/Inbox.php index fe0e2f759..a8bfb87fe 100644 --- a/app/Util/ActivityPub/Inbox.php +++ b/app/Util/ActivityPub/Inbox.php @@ -729,6 +729,9 @@ class Inbox $profile = self::actorFirstOrCreate($actor); $obj = $this->payload['object']; + if(!$profile) { + return; + } // TODO: Some implementations do not inline the object, skip for now if(!$obj || !is_array($obj) || !isset($obj['type'])) { return; @@ -788,7 +791,7 @@ class Inbox Like::whereProfileId($profile->id) ->whereStatusId($status->id) ->forceDelete(); - Notification::whereProfileId($status->profile->id) + Notification::whereProfileId($status->profile_id) ->whereActorId($profile->id) ->whereAction('like') ->whereItemId($status->id)