|
|
|
@ -131,10 +131,12 @@ const createWhatsApp = async phone => {
|
|
|
|
|
const imageFilename = './temp/image_' + whatsAppNo + '_' + msg.key.id + fileExtension;
|
|
|
|
|
await writeFile(imageFilename, imageBuffer);
|
|
|
|
|
|
|
|
|
|
const msgStatus = msg.status === undefined ? '' : formatStatus(msg.status);
|
|
|
|
|
|
|
|
|
|
waEmitter.emit(emitEventName, {
|
|
|
|
|
id: msg.key.id,
|
|
|
|
|
externalId,
|
|
|
|
|
status: formatStatus(msg.status),
|
|
|
|
|
status: msgStatus,
|
|
|
|
|
direction: msgDirection,
|
|
|
|
|
from: msgFrom,
|
|
|
|
|
to: msgTo,
|
|
|
|
@ -148,6 +150,7 @@ const createWhatsApp = async phone => {
|
|
|
|
|
},
|
|
|
|
|
conversation: {
|
|
|
|
|
type: isJidUser(msg.key.remoteJid) ? 'individual' : 'group',
|
|
|
|
|
name: groupSubject,
|
|
|
|
|
},
|
|
|
|
|
customerProfile: {
|
|
|
|
|
id: decodeJid(msg.key.participant),
|
|
|
|
|