mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2024-12-23 00:03:09 +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({
|
const tickets = await client.prisma.ticket.findMany({
|
||||||
where: {
|
where: {
|
||||||
categoryId: categoryId ?? undefined, // must be undefined not null
|
categoryId: categoryId ?? undefined, // must be undefined not null
|
||||||
|
guildId: interaction.guild.id,
|
||||||
lastMessageAt: { lte: new Date(Date.now() - time) },
|
lastMessageAt: { lte: new Date(Date.now() - time) },
|
||||||
open: true,
|
open: true,
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user