diff --git "a/src/api/routes/users/\043user_id/delete.ts" "b/src/api/routes/users/\043user_id/delete.ts" index a0b93cc..50494a2 100644 --- "a/src/api/routes/users/\043user_id/delete.ts" +++ "b/src/api/routes/users/\043user_id/delete.ts" @@ -62,7 +62,8 @@ select: [...PrivateUserProjection, "data"], }); - await InstanceBan.create({ user_id: user.id, reason: body?.reason ?? "" }).save(); + if (!(await InstanceBan.findOne({ where: { user_id: user.id } }))) + await InstanceBan.create({ user_id: user.id, reason: body?.reason ?? "" }).save(); // prevent bugginess with clients - delete all DMs, only having half of the conversation is quite useless anyhow const dmChannels = await user.getDmChannels();