Merge pull request #3768 from pixelfed/staging

Update Inbox
This commit is contained in:
daniel 2022-11-14 01:58:19 -07:00 committed by GitHub
commit 56f5facc30
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -192,7 +192,7 @@ class Inbox
if(!isset($activity['to'])) { if(!isset($activity['to'])) {
return; return;
} }
$to = $activity['to']; $to = isset($activity['to']) ? $activity['to'] : [];
$cc = isset($activity['cc']) ? $activity['cc'] : []; $cc = isset($activity['cc']) ? $activity['cc'] : [];
if($activity['type'] == 'Question') { if($activity['type'] == 'Question') {
@ -200,7 +200,9 @@ class Inbox
return; return;
} }
if(count($to) == 1 && if( is_array($to) &&
is_array($cc) &&
count($to) == 1 &&
count($cc) == 0 && count($cc) == 0 &&
parse_url($to[0], PHP_URL_HOST) == config('pixelfed.domain.app') parse_url($to[0], PHP_URL_HOST) == config('pixelfed.domain.app')
) { ) {