diff options
author | Mario <mario@mariovavti.com> | 2023-08-14 18:13:58 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2023-08-14 18:13:58 +0000 |
commit | 3ddab5966b667051013db889c7963f9133c9f94e (patch) | |
tree | b47916379ca24816faac38a8ec70aa65ed326918 | |
parent | 2d5c99f459c77dbf17db9809d3ba37d66f14b2a5 (diff) | |
download | volse-hubzilla-3ddab5966b667051013db889c7963f9133c9f94e.tar.gz volse-hubzilla-3ddab5966b667051013db889c7963f9133c9f94e.tar.bz2 volse-hubzilla-3ddab5966b667051013db889c7963f9133c9f94e.zip |
only try to fetch the icon if we actually got one
-rw-r--r-- | Zotlabs/Lib/Activity.php | 10 |
1 files changed, 7 insertions, 3 deletions
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) { |