カスタム絵文字のリクエスト承認用画面の追加

(cherry picked from commit 94451c380458b459791fc2bb6864a3255aca03c4)
This commit is contained in:
tar_bin 2023-08-11 23:02:54 +09:00 committed by mattyatea
parent bf9089209d
commit 21bee2ffde
4 changed files with 234 additions and 2 deletions

View file

@ -64,6 +64,7 @@ export const paramDef = {
type: 'object',
properties: {
query: { type: 'string', nullable: true, default: null },
draft: { type: 'boolean', nullable: true, default: null },
limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
sinceId: { type: 'string', format: 'misskey:id' },
untilId: { type: 'string', format: 'misskey:id' },
@ -86,6 +87,14 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
let emojis: MiEmoji[];
if (ps.draft !== null) {
if (ps.draft) {
q.andWhere('emoji.draft = TRUE');
} else {
q.andWhere('emoji.draft = FALSE');
}
}
if (ps.query) {
//q.andWhere('emoji.name ILIKE :q', { q: `%${ sqlLikeEscape(ps.query) }%` });
//const emojis = await q.limit(ps.limit).getMany();