From 43c93e74e7e72547547f80a767dcfa4219395a11 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sat, 24 Dec 2022 00:26:15 -0700 Subject: [PATCH] Update AP helpers --- app/Util/ActivityPub/Helpers.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Util/ActivityPub/Helpers.php b/app/Util/ActivityPub/Helpers.php index b66fb20d..b5603666 100644 --- a/app/Util/ActivityPub/Helpers.php +++ b/app/Util/ActivityPub/Helpers.php @@ -453,7 +453,7 @@ class Helpers { public static function storeStatus($url, $profile, $activity) { $id = isset($activity['id']) ? self::pluckval($activity['id']) : self::pluckval($activity['url']); - $url = isset($activity['url']) && is_string($activity['url']) ? $activity['url'] : $id; + $url = isset($activity['url']) && is_string($activity['url']) ? self::pluckval($activity['url']) : self::pluckval($id); $idDomain = parse_url($id, PHP_URL_HOST); $urlDomain = parse_url($url, PHP_URL_HOST); if(!self::validateUrl($id) || !self::validateUrl($url)) { @@ -556,7 +556,7 @@ class Helpers { { $id = isset($activity['id']) ? self::pluckval($activity['id']) : self::pluckval($url); $url = isset($activity['url']) ? self::pluckval($activity['url']) : self::pluckval($id); - $urlDomain = parse_url($url, PHP_URL_HOST); + $urlDomain = parse_url(self::pluckval($url), PHP_URL_HOST); $scope = 'private'; if(isset($activity['to']) == true) {