|
|
|
@ -81,7 +81,7 @@ export const sentMsgTypeMapped = {
|
|
|
|
|
message: msg.message_origin.text,
|
|
|
|
|
title: msg.message_origin.senderName || 'Reference',
|
|
|
|
|
titleColor: msg.message_origin?.senderName !== 'me' ? '#a791ff' : '#128c7e',
|
|
|
|
|
// titleColor: "#a791ff",
|
|
|
|
|
photoURL: msg.message_origin?.data?.uri || '',
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
: {}),
|
|
|
|
@ -213,6 +213,7 @@ export const whatsappMsgTypeMapped = {
|
|
|
|
|
id: msg.wamid,
|
|
|
|
|
text: msg.image.caption,
|
|
|
|
|
data: { id: msg.wamid, uri: msg.image.link, width: '100%', height: 200, alt: msg.image.caption, },
|
|
|
|
|
originText: msg.image?.caption || '',
|
|
|
|
|
onOpen: () => {
|
|
|
|
|
console.log('Open image', msg.image.link);
|
|
|
|
|
},
|
|
|
|
@ -227,6 +228,9 @@ export const whatsappMsgTypeMapped = {
|
|
|
|
|
id: msg.wamid,
|
|
|
|
|
data: { id: msg.wamid, uri: msg.sticker.link, width: '100%', height: 120, alt: '' },
|
|
|
|
|
}),
|
|
|
|
|
renderForReply: (msg) => ({
|
|
|
|
|
id: msg.wamid, photoURL: msg.sticker.link, width: '100%', height: 200, alt: '', message: '[表情]'
|
|
|
|
|
}),
|
|
|
|
|
},
|
|
|
|
|
video: {
|
|
|
|
|
type: 'video',
|
|
|
|
@ -243,7 +247,7 @@ export const whatsappMsgTypeMapped = {
|
|
|
|
|
},
|
|
|
|
|
}),
|
|
|
|
|
renderForReply: (msg) => ({
|
|
|
|
|
id: msg.wamid, videoURL: msg.video.link, width: 200, height: 200, alt: '',
|
|
|
|
|
id: msg.wamid, videoURL: msg.video.link, photoURL: msg.video.link, message: msg.video?.caption || '[视频]', width: 200, height: 200, alt: '',
|
|
|
|
|
}),
|
|
|
|
|
},
|
|
|
|
|
audio: {
|
|
|
|
@ -263,7 +267,10 @@ export const whatsappMsgTypeMapped = {
|
|
|
|
|
},
|
|
|
|
|
document: {
|
|
|
|
|
type: 'file',
|
|
|
|
|
data: (msg) => ({ id: msg.wamid, title: msg.document?.filename || '', text: msg.document?.caption || msg.document?.filename || '', data: { uri: msg.document.link, extension: 'PDF', status: { click: false, download: true, loading: 0, } } }),
|
|
|
|
|
data: (msg) => ({ id: msg.wamid, title: msg.document?.filename || '', text: msg.document?.caption || msg.document?.filename || '', data: { uri: msg.document.link, extension: 'PDF', status: { click: false, download: true, loading: 0, } }, originText: msg.document?.caption || msg.document?.filename || '', }),
|
|
|
|
|
renderForReply: (msg) => ({
|
|
|
|
|
id: msg.wamid, message: msg.document?.caption || msg.document?.filename || '',
|
|
|
|
|
}),
|
|
|
|
|
},
|
|
|
|
|
// location: 'location',
|
|
|
|
|
// contact: 'contact',
|
|
|
|
|