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
No known key found for this signature in database
GPG Key ID: 0DE40AE37BBA5C33

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,
},