perf(前端): wai 发文件

dev/supplier-email-drawer
Lei OT 9 months ago
parent e6f7af245f
commit b04d5cfa06

@ -119,7 +119,7 @@ const BubbleIM = ({ handlePreview, handleContactClick, setNewChatModalVisible, s
? {
// styles: { backgroundColor: '#ccd4ae' },
notchStyle: { fill: outboundStyle[message.msg_source.toLowerCase()].color },
title: <><ChannelLogo channel={message.msg_source} />{message.wabaName ? ` ${message.wabaName} - ${message.title || ''}` : ` ${message.title || message.from}`}</>,
title: <><ChannelLogo channel={message.msg_source} />{message.wabaName ? ` ${message.wabaName} - ${message.title || ''}` : ` ${message.title || message.from || ''}`}</>,
}
: {
// title: <>&nbsp;<ChannelLogo channel={message.msg_source} />&nbsp;{message.title}</>,

@ -36,6 +36,7 @@ const InputComposer = ({ channel, currentActive }) => {
const [referenceMsg, setReferenceMsg] = useConversationStore((state) => [state.referenceMsg, state.setReferenceMsg]);
const [complexMsg, setComplexMsg] = useConversationStore((state) => [state.complexMsg, state.setComplexMsg]);
const sentOrReceivedNewMessage = useConversationStore((state) => state.sentOrReceivedNewMessage);
const updateMessageItem = useConversationStore((state) => state.updateMessageItem);
const talkabled = !isEmpty(currentConversation.sn) && websocketOpened;
const isExpired = !isEmpty(currentConversation.conversation_expiretime) ? dayjs(currentConversation.conversation_expiretime).add(8, 'hours').isBefore(dayjs()) : true;
@ -176,6 +177,7 @@ const InputComposer = ({ channel, currentActive }) => {
id: `${currentConversation.sn}.${msgObj.id}`,
msg_source: channel,
wabaName: channel === 'waba' ? WABAccountsMapped[fromIM]?.verifiedName : '',
externalId: currentConversation.sn || ''
};
const contentToSend = sentMsgTypeMapped[msgObjMerge.type].contentToSend(msgObjMerge);
// olog('invoke upload send +++ ', contentToSend)
@ -186,6 +188,7 @@ const InputComposer = ({ channel, currentActive }) => {
setSendBtnLoading(false);
} catch (error) {
setSendBtnLoading(false);
updateMessageItem({ conversationid: currentConversation.sn || '', id: msgObjMerge.id, actionId: contentToSend.actionId, status: 'failed', replyButton: false, dateString: '发送失败 ❌' })
appNotification.error({ message: '发送失败', description: error.message, placement: 'bottom', duration: 6, });
// appMessage.error(error.message || '');
return false;

Loading…
Cancel
Save