Commit a11370c5 authored by Mark Harding's avatar Mark Harding

(chore): change position of feeds increment and filter for admins too

parent ba45f02b
No related merge requests found
Pipeline #65850856 (#752) passed with stages
in 8 minutes and 30 seconds
......@@ -156,7 +156,7 @@ class feeds implements Interfaces\Api
'period' => $period,
'sync' => $sync,
'query' => $query ?? null,
'single_owner_threshold' => Core\Session::isAdmin() ? 0 : 36,
'single_owner_threshold' => 36,
];
$nsfw = $_GET['nsfw'] ?? '';
......
......@@ -114,7 +114,7 @@ class Manager
$ownerGuid = $scoredGuid->getOwnerGuid() ?: $scoredGuid->getGuid();
if (++$i < $opts['single_owner_threshold']
if ($i < $opts['single_owner_threshold']
&& isset($owners[$ownerGuid])
&& !$opts['filter_hashtags']
&& !in_array($opts['type'], [ 'user', 'group' ])
......@@ -123,6 +123,8 @@ class Manager
}
$owners[$ownerGuid] = true;
++$i; // Update here as we don't want to count skipped
$feedSyncEntities[] = (new FeedSyncEntity())
->setGuid((string) $scoredGuid->getGuid())
->setOwnerGuid((string) $ownerGuid)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment