From bded1c3989854bbf8a23fd39592cd42161813165 Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 28 Nov 2022 14:51:37 +0000 Subject: [PATCH] Only use items that had originally been posted in the last week --- src/Module/Api/Mastodon/Trends/Statuses.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Module/Api/Mastodon/Trends/Statuses.php b/src/Module/Api/Mastodon/Trends/Statuses.php index cb69be5ed7..8974403d77 100644 --- a/src/Module/Api/Mastodon/Trends/Statuses.php +++ b/src/Module/Api/Mastodon/Trends/Statuses.php @@ -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 = [];