|
|
|
@ -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;
|
|
|
|
|