diff options
-rw-r--r-- | Zotlabs/Daemon/Notifier.php | 2 | ||||
-rw-r--r-- | Zotlabs/Lib/Activity.php | 7 | ||||
-rw-r--r-- | include/socgraph.php | 8 |
3 files changed, 8 insertions, 9 deletions
diff --git a/Zotlabs/Daemon/Notifier.php b/Zotlabs/Daemon/Notifier.php index d5fe7ee6d..592dd2c38 100644 --- a/Zotlabs/Daemon/Notifier.php +++ b/Zotlabs/Daemon/Notifier.php @@ -409,7 +409,7 @@ class Notifier { self::$private = false; self::$recipients = collect_recipients($parent_item, self::$private); - if ($top_level_post) { + if ($top_level_post && intval($target_item['item_wall'])) { // remove clones who will receive the post via sync self::$recipients = array_values(array_diff(self::$recipients, [$target_item['owner_xchan']])); } diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php index 8bb157347..dbf7f7b46 100644 --- a/Zotlabs/Lib/Activity.php +++ b/Zotlabs/Lib/Activity.php @@ -468,14 +468,17 @@ class Activity { $token = get_iconfig($i, 'ocap', 'relay'); if ($token && $has_images) { + $matches_processed = []; for ($n = 0; $n < count($images); $n++) { $match = $images[$n]; - if (str_starts_with($match[1], '=http') && str_contains($match[1], z_root() . '/photo/')) { + if (str_starts_with($match[1], '=http') && str_contains($match[1], z_root() . '/photo/') && !in_array($match[1], $matches_processed)) { $i['body'] = str_replace($match[1], $match[1] . '?token=' . $token, $i['body']); $images[$n][2] = substr($match[1], 1) . '?token=' . $token; - } elseif (str_contains($match[2], z_root() . '/photo/')) { + $matches_processed[] = $match[1]; + } elseif (str_contains($match[2], z_root() . '/photo/') && !in_array($match[2], $matches_processed)) { $i['body'] = str_replace($match[2], $match[2] . '?token=' . $token, $i['body']); $images[$n][2] = $match[2] . '?token=' . $token; + $matches_processed[] = $match[2]; } } } diff --git a/include/socgraph.php b/include/socgraph.php index 49cc45d52..e5e8ddf74 100644 --- a/include/socgraph.php +++ b/include/socgraph.php @@ -112,12 +112,8 @@ function poco_load($xchan = '', $url = null) { $profile_url = ''; $profile_photo = ''; $address = ''; - $name = ''; - $hash = ''; - $rating = 0; - - $name = $entry['displayName']; - $hash = $entry['hash']; + $name = $entry['displayName'] ?? ''; + $hash = $entry['hash'] ?? ''; if(x($entry,'urls') && is_array($entry['urls'])) { foreach($entry['urls'] as $url) { |