fix(🚨 security): being able to close tickets from other servers (closes #466)

This commit is contained in:
Isaac
2023-07-30 01:04:42 +01:00
parent 32697c6d13
commit 8a8bc2bebe

View File

@@ -139,6 +139,7 @@ module.exports = class ForceCloseSlashCommand extends SlashCommand {
const tickets = await client.prisma.ticket.findMany({
where: {
categoryId: categoryId ?? undefined, // must be undefined not null
guildId: interaction.guild.id,
lastMessageAt: { lte: new Date(Date.now() - time) },
open: true,
},