aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Daemon/Fetchparents.php
diff options
context:
space:
mode:
Diffstat (limited to 'Zotlabs/Daemon/Fetchparents.php')
-rw-r--r--Zotlabs/Daemon/Fetchparents.php42
1 files changed, 42 insertions, 0 deletions
diff --git a/Zotlabs/Daemon/Fetchparents.php b/Zotlabs/Daemon/Fetchparents.php
new file mode 100644
index 000000000..b00acdfbf
--- /dev/null
+++ b/Zotlabs/Daemon/Fetchparents.php
@@ -0,0 +1,42 @@
+<?php
+
+namespace Zotlabs\Daemon;
+
+use Zotlabs\Lib\Activity;
+
+class Fetchparents {
+
+ static public function run($argc, $argv) {
+
+ logger('Fetchparents invoked: ' . print_r($argv, true));
+
+ if ($argc < 4) {
+ return;
+ }
+
+ $channels = explode(',', $argv[1]);
+ if (!$channels) {
+ return;
+ }
+
+ $observer_hash = $argv[2];
+ if (!$observer_hash) {
+ return;
+ }
+
+ $mid = $argv[3];
+ if (!$mid) {
+ return;
+ }
+
+ $force = $argv[4] ?? false;
+
+ foreach ($channels as $channel_id) {
+ $channel = channelx_by_n($channel_id);
+ Activity::fetch_and_store_parents($channel, $observer_hash, $mid, null, $force);
+ }
+
+ return;
+
+ }
+}