upd: Separate quote from boost

This commit is contained in:
Mar0xy 2023-10-15 02:16:02 +02:00
parent 4359a13946
commit 7e648a255f
No known key found for this signature in database
GPG key ID: 56569BBE47D2C828
7 changed files with 413 additions and 206 deletions

View file

@ -44,6 +44,7 @@ export const paramDef = {
limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
sinceId: { type: 'string', format: 'misskey:id' },
untilId: { type: 'string', format: 'misskey:id' },
quote: { type: 'boolean', default: false },
},
required: ['noteId'],
} as const;
@ -74,7 +75,13 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
if (ps.userId) {
query.andWhere("user.id = :userId", { userId: ps.userId });
}
}
if (ps.quote) {
query.andWhere("note.text IS NOT NULL");
} else {
query.andWhere("note.text IS NULL");
}
this.queryService.generateVisibilityQuery(query, me);
if (me) this.queryService.generateMutedUserQuery(query, me);