summary refs log tree commit diff
path: root/src/api
diff options
context:
space:
mode:
Diffstat (limited to 'src/api')
-rw-r--r--src/api/routes/users/#user_id/delete.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/api/routes/users/#user_id/delete.ts b/src/api/routes/users/#user_id/delete.ts

index 50494a23..be361f18 100644 --- a/src/api/routes/users/#user_id/delete.ts +++ b/src/api/routes/users/#user_id/delete.ts
@@ -62,7 +62,7 @@ router.post( select: [...PrivateUserProjection, "data"], }); - if (!(await InstanceBan.findOne({ where: { user_id: user.id } }))) + if ((body?.persistInstanceBan ?? true) && !(await InstanceBan.findOne({ where: { user_id: user.id } }))) await InstanceBan.create({ user_id: user.id, reason: body?.reason ?? "<legacy instance ban API - no reason specified>" }).save(); // prevent bugginess with clients - delete all DMs, only having half of the conversation is quite useless anyhow