From b047d31a4f681ec3038607cb1938f47a8f81ce88 Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 1 Dec 2020 23:46:50 +0000 Subject: [PATCH] Added logging and default config value --- src/Protocol/Feed.php | 4 ++++ static/defaults.config.php | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/Protocol/Feed.php b/src/Protocol/Feed.php index f874b4b026..2d5fbff4f7 100644 --- a/src/Protocol/Feed.php +++ b/src/Protocol/Feed.php @@ -648,6 +648,10 @@ class Feed $last_publish = DI::pConfig()->get($posting['item']['uid'], 'system', 'last_publish', 0, true); $next_publish = max($last_publish + (60 * $min_posting), time()); if ($publish_time < $next_publish) { + Logger::notice('Adapting publish time', + ['last' => date(DateTimeFormat::MYSQL, $last_publish), + 'next' => date(DateTimeFormat::MYSQL, $next_publish), + 'publish' => date(DateTimeFormat::MYSQL, $publish_time)]); $publish_time = $next_publish; } $publish_at = date(DateTimeFormat::MYSQL, $publish_time); diff --git a/static/defaults.config.php b/static/defaults.config.php index f70bf8c8f6..e7d7985aa4 100644 --- a/static/defaults.config.php +++ b/static/defaults.config.php @@ -383,6 +383,10 @@ return [ // minimal distance in minutes between two polls for a contact. Reasonable values are between 1 and 59. 'min_poll_interval' => 15, + // minimum_posting_interval (Integer) + // Minimum interval between two feed posts per user + 'minimum_posting_interval' => 0, + // no_count (Boolean) // Don't do count calculations (currently only when showing photo albums). 'no_count' => false,