enhance: タグ検索においてローカルのみやファイル付きを指定できるように (MisskeyIO#527)
cheery-picked from TeamNijimiss/misskey@4fe36c8eb9 Co-authored-by: Nafu Satsuki <satsuki@nafusoft.dev>
This commit is contained in:
parent
5c019eec04
commit
c2e1f60943
3 changed files with 51 additions and 3 deletions
|
@ -30,6 +30,7 @@ export const meta = {
|
|||
export const paramDef = {
|
||||
type: 'object',
|
||||
properties: {
|
||||
local: { type: 'boolean', nullable: true, default: null },
|
||||
reply: { type: 'boolean', nullable: true, default: null },
|
||||
renote: { type: 'boolean', nullable: true, default: null },
|
||||
withFiles: {
|
||||
|
@ -105,6 +106,14 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
throw e;
|
||||
}
|
||||
|
||||
if (ps.local != null) {
|
||||
if (ps.local) {
|
||||
query.andWhere('user.host IS NULL');
|
||||
} else {
|
||||
query.andWhere('user.host IS NOT NULL');
|
||||
}
|
||||
}
|
||||
|
||||
if (ps.reply != null) {
|
||||
if (ps.reply) {
|
||||
query.andWhere('note.replyId IS NOT NULL');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue