mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-30 17:13:08 +02:00
アカウント削除時にメッセージも削除するように
This commit is contained in:
parent
3409a51cca
commit
922a657c7e
1 changed files with 2 additions and 0 deletions
|
@ -3,6 +3,7 @@ import * as bcrypt from 'bcryptjs';
|
||||||
import User from '../../../../models/user';
|
import User from '../../../../models/user';
|
||||||
import define from '../../define';
|
import define from '../../define';
|
||||||
import { createDeleteNotesJob, createDeleteDriveFilesJob } from '../../../../queue';
|
import { createDeleteNotesJob, createDeleteDriveFilesJob } from '../../../../queue';
|
||||||
|
import Message from '../../../../models/messaging-message';
|
||||||
|
|
||||||
export const meta = {
|
export const meta = {
|
||||||
requireCredential: true,
|
requireCredential: true,
|
||||||
|
@ -42,6 +43,7 @@ export default define(meta, (ps, user) => new Promise(async (res, rej) => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Message.remove({ userId: user._id });
|
||||||
createDeleteNotesJob(user);
|
createDeleteNotesJob(user);
|
||||||
createDeleteDriveFilesJob(user);
|
createDeleteDriveFilesJob(user);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue