]> git.mxchange.org Git - friendica.git/commitdiff
Only use items that had originally been posted in the last week
authorMichael <heluecht@pirati.ca>
Mon, 28 Nov 2022 14:51:37 +0000 (14:51 +0000)
committerMichael <heluecht@pirati.ca>
Mon, 28 Nov 2022 14:51:37 +0000 (14:51 +0000)
src/Module/Api/Mastodon/Trends/Statuses.php

index cb69be5ed7f919feab48ab4c9667da445195074d..8974403d770789eb16add8ed2c8a756cebb56da2 100644 (file)
@@ -43,7 +43,7 @@ class Statuses extends BaseApi
                        'limit' => 10, // Maximum number of results to return. Defaults to 10.
                ], $request);
 
-               $condition = ["NOT `private` AND `commented` > ?", DateTimeFormat::utc('now -1 day')];
+               $condition = ["NOT `private` AND `commented` > ? AND `created` > ?", DateTimeFormat::utc('now -1 day'), DateTimeFormat::utc('now -1 week')];
                $condition = DBA::mergeConditions($condition, ['network' => Protocol::FEDERATED]);
 
                $trending = [];