diff options
author | Mario <mario@mariovavti.com> | 2023-01-13 20:01:05 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2023-01-13 20:01:05 +0000 |
commit | 2805520d1bcb2640fc079d54f5f230f7b87d1f84 (patch) | |
tree | 43b3e5bb7c71522d04560015478765a7b763a5fe /Zotlabs/Daemon/Convo.php | |
parent | f6d940606350eb8685c278af6d87f3a0b8c0f5e5 (diff) | |
parent | fb7ca18820e7618325dded78a3c3a464dd01b391 (diff) | |
download | volse-hubzilla-2805520d1bcb2640fc079d54f5f230f7b87d1f84.tar.gz volse-hubzilla-2805520d1bcb2640fc079d54f5f230f7b87d1f84.tar.bz2 volse-hubzilla-2805520d1bcb2640fc079d54f5f230f7b87d1f84.zip |
Merge remote-tracking branch 'origin/8.0RC'8.0
Diffstat (limited to 'Zotlabs/Daemon/Convo.php')
-rw-r--r-- | Zotlabs/Daemon/Convo.php | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/Zotlabs/Daemon/Convo.php b/Zotlabs/Daemon/Convo.php index 940216b2c..d1a7e4f4d 100644 --- a/Zotlabs/Daemon/Convo.php +++ b/Zotlabs/Daemon/Convo.php @@ -30,6 +30,7 @@ class Convo { intval($channel_id), dbesc($contact_hash) ); + if (!$r) { return; } @@ -40,19 +41,25 @@ class Convo { $messages = $obj->get(); - if ($messages) { - foreach ($messages as $message) { - if (is_string($message)) { - $message = Activity::fetch($message, $channel); - } - // set client flag because comments will probably just be objects and not full blown activities - // and that lets us use implied_create - $AS = new ActivityStreams($message); - if ($AS->is_valid() && is_array($AS->obj)) { - $item = Activity::decode_note($AS); - Activity::store($channel, $contact['abook_xchan'], $AS, $item); - } + if (!$messages) { + return; + } + + foreach ($messages as $message) { + if (is_string($message)) { + $message = Activity::fetch($message, $channel); + } + + // set client flag because comments will probably just be objects and not full blown activities + // and that lets us use implied_create + $AS = new ActivityStreams($message); + if ($AS->is_valid() && is_array($AS->obj)) { + $item = Activity::decode_note($AS); + Activity::store($channel, $contact['abook_xchan'], $AS, $item); } } + + return; + } } |