perf: 群图片消息加上组名;图片接收状态加上空值

dev/supplier-email-drawer
LiaoYijun 6 months ago
parent e2948a54cc
commit d544e845df

@ -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),

Loading…
Cancel
Save