1
0

add: Bot Trending Toggle, Hide Bot in Timeline client option

This commit is contained in:
Mar0xy
2023-10-18 07:29:16 +02:00
parent fa5cf36602
commit c21d255604
19 changed files with 90 additions and 1 deletions
@@ -46,6 +46,7 @@ export const paramDef = {
includeLocalRenotes: { type: 'boolean', default: true },
withFiles: { type: 'boolean', default: false },
withRenotes: { type: 'boolean', default: true },
withBots: { type: 'boolean', default: true },
},
required: [],
} as const;
@@ -97,6 +98,8 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
.leftJoinAndSelect('renote.user', 'renoteUser')
.leftJoinAndSelect('note.channel', 'channel');
if (!ps.withBots) query.andWhere('user.isBot = FALSE');
let timeline = await query.getMany();
timeline = timeline.filter(note => {