fix: 在线消息: replyButton

dev/code-splitting
Lei OT 2 years ago
parent 80b16562da
commit ac81169bde

@ -413,7 +413,7 @@ export const whatsappMsgTypeMapped = {
unsupported: {
type: 'text',
data: (msg) => ({ id: msg.wamid, text: `[暂不支持此消息类型](${msg.wamid})` }),
renderForReply: (msg) => ({ id: msg.wamid, text: `[Message type unsupported](${msg.wamid})` }),
renderForReply: (msg) => ({ id: msg?.wamid || msg.id, text: `[Message type unsupported](${msg.wamid})` }),
},
reaction: {
type: 'text',

@ -148,10 +148,12 @@ const MessagesList = ({ messages, handlePreview, reference, longListLoading, get
onOpen={() => handlePreview(message)}
onTitleClick={() => handlePreview(message)}
text={<RenderText str={message?.text || ''} className={message.status === 'failed' ? 'line-through text-neutral-400' : ''} template={message.template} />}
replyButton={['text', 'document', 'image'].includes(message.whatsapp_msg_type)}
{...(message.sender === 'me'
? {
styles: { backgroundColor: '#ccd4ae' },
notchStyle: { fill: '#ccd4ae' },
replyButton: ['text', 'document', 'image'].includes(message.whatsapp_msg_type) && message.status !== 'failed' ? true : false,
}
: {})}
className={[

Loading…
Cancel
Save