fix: 消息: 视频和附件的text 显示

dev/timezone
Lei OT 1 year ago
parent fbfb6e0197
commit 5ceb894f48

@ -382,6 +382,7 @@ export const whatsappMsgTypeMapped = {
type: 'video',
data: (msg) => ({
id: msg.wamid,
text: msg.video.caption,
data: {
id: msg.wamid,
videoURL: msg.video.link,
@ -432,7 +433,7 @@ export const whatsappMsgTypeMapped = {
data: (msg) => ({
id: msg.wamid,
title: msg.document?.filename || '',
text: (msg.document?.filename || '') + `\n${msg.document?.caption || ''}`,
text: msg.document?.caption || msg.document?.filename || '',
data: { uri: msg.document.link, status: { click: false, download: true, loading: 0 } },
originText: msg.document?.caption || msg.document?.filename || '',
}),

@ -188,6 +188,17 @@
}
.chatwindow-wrapper .rce-mbox-file>button{
width: 100%;
text-align: left;
}
.chatwindow-wrapper .rce-mbox-file>button>.rce-mbox-file--text{
color: rgba(0, 0, 0, 0.78);
}
.chatwindow-wrapper .rce-mbox-reply-message{
max-width: unset;
overflow: unset;
text-overflow: unset;
white-space: unset;
}
/** Chat history ------------------------------------------------------------------------------------ */

@ -148,7 +148,7 @@ const MessagesList = ({ ...props }) => {
return prev;
}, []);
return (
<span className={`text-sm leading-5 emoji-text ${className} ${extraClass} `} key={'msg-text'}>
<span className={`text-sm leading-5 emoji-text whitespace-pre-wrap ${className} ${extraClass} `} key={'msg-text'}>
{(objArr || []).map((part, index) => {
if (part.type === 'link') {
return (

Loading…
Cancel
Save