mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2024-11-05 04:13:08 +02:00
fix(🚨 security): being able to close tickets from other servers (closes #466)
This commit is contained in:
parent
32697c6d13
commit
8a8bc2bebe
@ -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,
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user