Send Delete activity on suspend (#5165)
* Send Delete Person activity * Delete activityの後にフォロー解除する * アカウント削除でもDelete activity
This commit is contained in:
parent
ef44eda69e
commit
9c4e64b7b5
5 changed files with 81 additions and 1 deletions
|
|
@ -3,6 +3,7 @@ import * as bcrypt from 'bcryptjs';
|
|||
import define from '../../define';
|
||||
import { Users, UserProfiles } from '../../../../models';
|
||||
import { ensure } from '../../../../prelude/ensure';
|
||||
import { doPostSuspend } from '../../../../services/suspend-user';
|
||||
|
||||
export const meta = {
|
||||
requireCredential: true,
|
||||
|
|
@ -26,5 +27,8 @@ export default define(meta, async (ps, user) => {
|
|||
throw new Error('incorrect password');
|
||||
}
|
||||
|
||||
// 物理削除する前にDelete activityを送信する
|
||||
await doPostSuspend(user).catch(e => {});
|
||||
|
||||
await Users.delete(user.id);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue