mirror of
https://github.com/cheveguerra/whaticket-community.git
synced 2026-04-20 20:59:16 +00:00
improvement: change reopen ticket logic to use 'updatedAt'
This commit is contained in:
@@ -116,7 +116,7 @@ const verifyTicket = async (
|
|||||||
if (!ticket) {
|
if (!ticket) {
|
||||||
ticket = await Ticket.findOne({
|
ticket = await Ticket.findOne({
|
||||||
where: {
|
where: {
|
||||||
createdAt: {
|
updatedAt: {
|
||||||
[Op.between]: [+subHours(new Date(), 2), +new Date()]
|
[Op.between]: [+subHours(new Date(), 2), +new Date()]
|
||||||
},
|
},
|
||||||
contactId: groupContact ? groupContact.id : contact.id
|
contactId: groupContact ? groupContact.id : contact.id
|
||||||
|
|||||||
Reference in New Issue
Block a user