From 4b8dc17140f3148749c8e6d4d5eff2963d8ce72c Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Mon, 14 Nov 2022 01:57:45 -0700 Subject: [PATCH] Update Inbox --- app/Util/ActivityPub/Inbox.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/Util/ActivityPub/Inbox.php b/app/Util/ActivityPub/Inbox.php index f103ddc7..fe0e2f75 100644 --- a/app/Util/ActivityPub/Inbox.php +++ b/app/Util/ActivityPub/Inbox.php @@ -192,7 +192,7 @@ class Inbox if(!isset($activity['to'])) { return; } - $to = $activity['to']; + $to = isset($activity['to']) ? $activity['to'] : []; $cc = isset($activity['cc']) ? $activity['cc'] : []; if($activity['type'] == 'Question') { @@ -200,7 +200,9 @@ class Inbox return; } - if(count($to) == 1 && + if( is_array($to) && + is_array($cc) && + count($to) == 1 && count($cc) == 0 && parse_url($to[0], PHP_URL_HOST) == config('pixelfed.domain.app') ) {