From 93ac3c985fd35a9826c5421360da368ff07dd315 Mon Sep 17 00:00:00 2001 From: Mario Date: Fri, 22 Jan 2021 10:06:50 +0000 Subject: implement externals via zot6 and zotfeed - part 1 --- Zotlabs/Daemon/Convo.php | 58 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 Zotlabs/Daemon/Convo.php (limited to 'Zotlabs/Daemon/Convo.php') diff --git a/Zotlabs/Daemon/Convo.php b/Zotlabs/Daemon/Convo.php new file mode 100644 index 000000000..f7478d778 --- /dev/null +++ b/Zotlabs/Daemon/Convo.php @@ -0,0 +1,58 @@ +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, true); + Activity::store($channel, $contact['abook_xchan'], $AS, $item); + } + } + } + } +} -- cgit v1.2.3