aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Daemon/Convo.php
diff options
context:
space:
mode:
Diffstat (limited to 'Zotlabs/Daemon/Convo.php')
-rw-r--r--Zotlabs/Daemon/Convo.php31
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;
+
}
}