mirror of
https://github.com/cheveguerra/whaticket-community.git
synced 2026-04-18 03:39:29 +00:00
fix: new messages not appearing in ticket subheader
This commit is contained in:
@@ -111,7 +111,7 @@ export const initWbot = async (whatsapp: Whatsapp): Promise<Session> => {
|
||||
});
|
||||
|
||||
wbot.on("ready", async () => {
|
||||
logger.info("Session:", sessionName, "READY");
|
||||
logger.info(`Session: ${sessionName} READY`);
|
||||
|
||||
await whatsapp.update({
|
||||
status: "CONNECTED",
|
||||
@@ -131,7 +131,7 @@ export const initWbot = async (whatsapp: Whatsapp): Promise<Session> => {
|
||||
}
|
||||
|
||||
wbot.sendPresenceAvailable();
|
||||
syncUnreadMessages(wbot);
|
||||
await syncUnreadMessages(wbot);
|
||||
|
||||
resolve(wbot);
|
||||
});
|
||||
|
||||
@@ -98,8 +98,8 @@ const verifyMediaMessage = async (
|
||||
quotedMsgId: quotedMsg?.id
|
||||
};
|
||||
|
||||
const newMessage = await CreateMessageService({ messageData });
|
||||
await ticket.update({ lastMessage: msg.body || media.filename });
|
||||
const newMessage = await CreateMessageService({ messageData });
|
||||
|
||||
return newMessage;
|
||||
};
|
||||
@@ -122,8 +122,8 @@ const verifyMessage = async (
|
||||
quotedMsgId: quotedMsg?.id
|
||||
};
|
||||
|
||||
await CreateMessageService({ messageData });
|
||||
await ticket.update({ lastMessage: msg.body });
|
||||
await CreateMessageService({ messageData });
|
||||
};
|
||||
|
||||
const isValidMsg = (msg: WbotMessage): boolean => {
|
||||
|
||||
Reference in New Issue
Block a user