]> git.mxchange.org Git - friendica.git/commitdiff
Fixed function name and variable
authorMichael Vogel <icarus@dabo.de>
Mon, 30 Nov 2020 08:59:29 +0000 (09:59 +0100)
committerMichael Vogel <icarus@dabo.de>
Mon, 30 Nov 2020 08:59:29 +0000 (09:59 +0100)
src/Protocol/Feed.php

index 0c945a1809db6ea7274a2c31960a0b7b779d2a45..5231107146147731ddb742bcd3f67208c68e1ab1 100644 (file)
@@ -619,7 +619,7 @@ class Feed
                        $total = count($postings);
                        if ($total > 1) {
                                // Posts shouldn't be delayed more than a day
-                               $interval = max(1440, self::getPollInterval($contact));
+                               $interval = min(1440, self::getPollInterval($contact));
                                $delay = round(($interval * 60) / $total);
                                Logger::notice('Got posting delay', ['delay' => $delay, 'interval' => $interval, 'items' => $total, 'cid' => $contact['id'], 'url' => $contact['url']]);
                        } else {
@@ -635,7 +635,7 @@ class Feed
                                        $post_delay += $delay;
                                }
 
-                               Worker::add(['priority' => PRIORITY_HIGH, 'delayed' => $post_delay],
+                               Worker::add(['priority' => PRIORITY_HIGH, 'delayed' => $publish_at],
                                        'DelayedPublish', $posting['item'], $posting['notify'], $posting['taglist'], $posting['attachments']);
                        }
                }