aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Daemon
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2024-01-25 10:13:10 +0000
committerMario <mario@mariovavti.com>2024-01-25 10:13:10 +0000
commitc0a7dfe2f6554fc66e753c456551dd580c479820 (patch)
tree2a5fe12284f8c2bfd44eb9e2af19fc9ef4e65cb4 /Zotlabs/Daemon
parentfe50d78a0f3d7655cd5eefb7cdae44779c52b2b1 (diff)
downloadvolse-hubzilla-c0a7dfe2f6554fc66e753c456551dd580c479820.tar.gz
volse-hubzilla-c0a7dfe2f6554fc66e753c456551dd580c479820.tar.bz2
volse-hubzilla-c0a7dfe2f6554fc66e753c456551dd580c479820.zip
refactor fetch_and_store_parents() and inroduce the fetchparents daemon
Diffstat (limited to 'Zotlabs/Daemon')
-rw-r--r--Zotlabs/Daemon/Fetchparents.php39
1 files changed, 39 insertions, 0 deletions
diff --git a/Zotlabs/Daemon/Fetchparents.php b/Zotlabs/Daemon/Fetchparents.php
new file mode 100644
index 000000000..4daf8c019
--- /dev/null
+++ b/Zotlabs/Daemon/Fetchparents.php
@@ -0,0 +1,39 @@
+<?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;
+ }
+
+ $channel = channelx_by_n(intval($argv[1]));
+ if (!$channel) {
+ return;
+ }
+
+ $observer_hash = $argv[2];
+ if (!$observer_hash) {
+ return;
+ }
+
+ $mid = $argv[3];
+ if (!$mid) {
+ return;
+ }
+
+ $force = $argv[4] ?? false;
+
+ Activity::fetch_and_store_parents($channel, $observer_hash, $mid, null, $force);
+
+ return;
+
+ }
+}