feat: 時限ミュート

#7677
This commit is contained in:
syuilo
2022-03-04 20:23:53 +09:00
parent 82f9d5501b
commit e68278f93e
12 changed files with 116 additions and 6 deletions

View File

@ -7,7 +7,7 @@ import { addFile } from '@/services/drive/add-file.js';
import { format as dateFormat } from 'date-fns';
import { getFullApAccount } from '@/misc/convert-host.js';
import { Users, Mutings } from '@/models/index.js';
import { MoreThan } from 'typeorm';
import { IsNull, MoreThan } from 'typeorm';
import { DbUserJobData } from '@/queue/types.js';
const logger = queueLogger.createSubLogger('export-mute');
@ -40,6 +40,7 @@ export async function exportMute(job: Bull.Job<DbUserJobData>, done: any): Promi
const mutes = await Mutings.find({
where: {
muterId: user.id,
expiresAt: IsNull(),
...(cursor ? { id: MoreThan(cursor) } : {}),
},
take: 100,