From 3ddab5966b667051013db889c7963f9133c9f94e Mon Sep 17 00:00:00 2001 From: Mario Date: Mon, 14 Aug 2023 18:13:58 +0000 Subject: only try to fetch the icon if we actually got one --- Zotlabs/Lib/Activity.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'Zotlabs') diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php index 2741cc79a..49628c24b 100644 --- a/Zotlabs/Lib/Activity.php +++ b/Zotlabs/Lib/Activity.php @@ -1697,7 +1697,7 @@ class Activity { $webfinger_addr = escape_tags($person_obj['preferredUsername']) . '@' . $hostname; } - $icon = z_root() . '/' . get_default_profile_photo(300); + $icon = null; if (isset($person_obj['icon'])) { if (is_array($person_obj['icon'])) { if (array_key_exists('url', $person_obj['icon'])) { @@ -1807,6 +1807,9 @@ class Activity { 'xchan_addr' => $webfinger_addr, 'xchan_url' => $profile, 'xchan_name' => escape_tags($name), + 'xchan_photo_l' => z_root() . '/' . get_default_profile_photo(), + 'xchan_photo_m' => z_root() . '/' . get_default_profile_photo(80), + 'xchan_photo_s' => z_root() . '/' . get_default_profile_photo(48), 'xchan_name_date' => datetime_convert(), 'xchan_network' => 'activitypub', 'xchan_pubforum' => intval($group_actor) @@ -1846,8 +1849,9 @@ class Activity { } } - Master::Summon(['Xchan_photo', bin2hex($icon), bin2hex($url)]); - + if ($icon) { + Master::Summon(['Xchan_photo', bin2hex($icon), bin2hex($url)]); + } } static function create_action($channel, $observer_hash, $act) { -- cgit v1.2.3