From 48485d44e761c9d7f8cfe6e9ca1816374011fe9c Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Thu, 29 Dec 2022 04:22:51 -0700 Subject: [PATCH] Update ap inbox --- app/Util/ActivityPub/Inbox.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/app/Util/ActivityPub/Inbox.php b/app/Util/ActivityPub/Inbox.php index a608899b..c8fa9500 100644 --- a/app/Util/ActivityPub/Inbox.php +++ b/app/Util/ActivityPub/Inbox.php @@ -829,7 +829,15 @@ class Inbox break; case 'Like': - $status = Helpers::statusFirstOrFetch($obj['object']); + $objectUri = $obj['object']; + if(!is_string($objectUri)) { + if(is_array($objectUri) && isset($objectUri['id']) && is_string($objectUri['id'])) { + $objectUri = $objectUri['id']; + } else { + return; + } + } + $status = Helpers::statusFirstOrFetch($objectUri); if(!$status) { return; }