mirror of
https://framagit.org/hubzilla/core.git
synced 2026-06-21 00:52:33 -04:00
Fetch conversations in the background. Otherwise it might sgnificantly delay delivery
This commit is contained in:
31
Zotlabs/Daemon/Zotconvo.php
Normal file
31
Zotlabs/Daemon/Zotconvo.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace Zotlabs\Daemon;
|
||||
|
||||
use Zotlabs\Lib\Libzot;
|
||||
|
||||
class Zotconvo {
|
||||
|
||||
static public function run($argc, $argv) {
|
||||
|
||||
logger('Zotconvo invoked: ' . print_r($argv, true));
|
||||
|
||||
if ($argc != 3) {
|
||||
return;
|
||||
}
|
||||
|
||||
$channel_id = intval($argv[1]);
|
||||
$mid = $argv[2];
|
||||
|
||||
$channel = channelx_by_n($channel_id);
|
||||
|
||||
if (!$channel) {
|
||||
return;
|
||||
}
|
||||
|
||||
Libzot::fetch_conversation($channel, $mid);
|
||||
|
||||
return;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1722,7 +1722,7 @@ class Libzot {
|
||||
// this is just an exercise in futility.
|
||||
|
||||
if (perm_is_allowed($channel['channel_id'], $sender, 'send_stream')) {
|
||||
self::fetch_conversation($channel, $arr['parent_mid']);
|
||||
Master::Summon(['Zotconvo', $channel['channel_id'], $arr['parent_mid']]);
|
||||
}
|
||||
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user