Skip to content

Commit

Permalink
Melhorado a dinamica de mostrar os 2V de quando envia mensagem
Browse files Browse the repository at this point in the history
  • Loading branch information
T3uZ committed Oct 30, 2024
1 parent d5e404d commit 74e320b
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions backend/src/services/WbotServices/wbotMessageListener.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,10 @@ interface Session extends Client {
const writeFileAsync = promisify(writeFile);

const verifyContact = async (msgContact: WbotContact): Promise<Contact> => {
const profilePicUrl = await msgContact.getProfilePicUrl();

const contactData = {
name: msgContact.name || msgContact.pushname || msgContact.id.user,
number: msgContact.id.user,
profilePicUrl,
isGroup: msgContact.isGroup
};

Expand Down Expand Up @@ -713,6 +711,14 @@ const handleMessage = async (
);
await verifyMessage(sentMessage, ticket, contact);
}
const profilePicUrl = await msgContact.getProfilePicUrl();
const contactData = {
name: msgContact.name || msgContact.pushname || msgContact.id.user,
number: msgContact.id.user,
profilePicUrl,
isGroup: msgContact.isGroup
};
await CreateOrUpdateContactService(contactData);
} catch (err) {
Sentry.captureException(err);
logger.error(`Error handling whatsapp message: Err: ${err}`);
Expand Down

0 comments on commit 74e320b

Please sign in to comment.