Directly post non mirrored feed items

This commit is contained in:
Michael 2020-12-02 05:08:39 +00:00
parent 775075c5db
commit b54465ba9c
1 changed files with 19 additions and 16 deletions

View File

@ -638,13 +638,17 @@ class Feed
$post_delay = 0;
foreach ($postings as $posting) {
$publish_time = time();
if (!$posting['notify']) {
Post\Delayed::publish($posting['item'], $posting['notify'], $posting['taglist'], $posting['attachments']);
continue;
}
if ($posting['notify']) {
if ($delay > 0) {
$publish_time = time() + $post_delay;
Logger::notice('Got publishing date', ['delay' => $delay, 'cid' => $contact['id'], 'url' => $contact['url']]);
$post_delay += $delay;
} else {
$publish_time = time();
}
$last_publish = DI::pConfig()->get($posting['item']['uid'], 'system', 'last_publish', 0, true);
@ -656,7 +660,6 @@ class Feed
'publish' => date(DateTimeFormat::MYSQL, $publish_time)]);
$publish_time = $next_publish;
}
}
$publish_at = date(DateTimeFormat::MYSQL, $publish_time);
Post\Delayed::add($publish_at, $posting['item'], $posting['notify'], $posting['taglist'], $posting['attachments']);