aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Daemon/Zotconvo.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2024-01-29 10:33:13 +0000
committerMario <mario@mariovavti.com>2024-01-29 10:33:13 +0000
commit29489f62cfc27705a0993532929c244d9d99b7bf (patch)
tree665cbe3c1dfc80b92278223e677d503e42d979fd /Zotlabs/Daemon/Zotconvo.php
parent09465619e53c9c0a04ee73cecc3fc2d87ee74d55 (diff)
downloadvolse-hubzilla-29489f62cfc27705a0993532929c244d9d99b7bf.tar.gz
volse-hubzilla-29489f62cfc27705a0993532929c244d9d99b7bf.tar.bz2
volse-hubzilla-29489f62cfc27705a0993532929c244d9d99b7bf.zip
introduce Activity::init_background_fetch() and refactor zotconvo to implement it
Diffstat (limited to 'Zotlabs/Daemon/Zotconvo.php')
-rw-r--r--Zotlabs/Daemon/Zotconvo.php17
1 files changed, 11 insertions, 6 deletions
diff --git a/Zotlabs/Daemon/Zotconvo.php b/Zotlabs/Daemon/Zotconvo.php
index 16e7f113f..188956d26 100644
--- a/Zotlabs/Daemon/Zotconvo.php
+++ b/Zotlabs/Daemon/Zotconvo.php
@@ -10,21 +10,26 @@ class Zotconvo {
logger('Zotconvo invoked: ' . print_r($argv, true));
- if ($argc != 3) {
+ if ($argc < 3) {
return;
}
- $mid = $argv[2];
- if (!$mid) {
+ $channels = explode(',', $argv[1]);
+ if (!$channels) {
return;
}
- $channel = channelx_by_n(intval($argv[1]));
- if (!$channel) {
+ $mid = $argv[2];
+ if (!$mid) {
return;
}
- Libzot::fetch_conversation($channel, $mid);
+ $force = $argv[3] ?? false;
+
+ foreach ($channels as $channel_id) {
+ $channel = channelx_by_n($channel_id);
+ Libzot::fetch_conversation($channel, $mid, $force);
+ }
return;