mirror of
https://codeberg.org/yeentown/barkey.git
synced 2025-07-07 20:44:34 +00:00
merge: Fix hidden hashtags showing on the explore / trending page (!1014)
View MR for information: https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/1014 Approved-by: dakkar <dakkar@thenautilus.net> Approved-by: Marie <github@yuugi.dev>
This commit is contained in:
commit
c0c41af5f9
1 changed files with 6 additions and 0 deletions
|
@ -58,6 +58,12 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
if (ps.attachedToLocalUserOnly) query.andWhere('tag.attachedLocalUsersCount != 0');
|
||||
if (ps.attachedToRemoteUserOnly) query.andWhere('tag.attachedRemoteUsersCount != 0');
|
||||
|
||||
// Ignore hidden hashtags
|
||||
query.andWhere(`
|
||||
NOT EXISTS (
|
||||
SELECT 1 FROM meta WHERE tag.name = ANY(meta."hiddenTags")
|
||||
)`);
|
||||
|
||||
switch (ps.sort) {
|
||||
case '+mentionedUsers': query.orderBy('tag.mentionedUsersCount', 'DESC'); break;
|
||||
case '-mentionedUsers': query.orderBy('tag.mentionedUsersCount', 'ASC'); break;
|
||||
|
|
Loading…
Add table
Reference in a new issue