mirror of
https://github.com/cheveguerra/whaticket-community.git
synced 2026-04-17 19:37:02 +00:00
fix: can't load messages when ther's no whatsapp session
This commit is contained in:
@@ -23,7 +23,13 @@ const setMessagesAsRead = async ticket => {
|
||||
}
|
||||
);
|
||||
|
||||
await wbot.sendSeen(`${ticket.contact.number}@c.us`);
|
||||
try {
|
||||
await wbot.sendSeen(`${ticket.contact.number}@c.us`);
|
||||
} catch (err) {
|
||||
console.log(
|
||||
"Could not mark messages as read. Maybe whatsapp session disconnected?"
|
||||
);
|
||||
}
|
||||
|
||||
io.to("notification").emit("ticket", {
|
||||
action: "updateUnread",
|
||||
|
||||
Reference in New Issue
Block a user