perf: 发送的waba消息: 显示商业号名称

2.0/wai-server
Lei OT 10 months ago
parent fb9be9569f
commit 73f7e00265

@ -7,7 +7,7 @@ import useConversationStore from '@/stores/ConversationStore';
import { SendOutlined, CloseCircleOutlined, LoadingOutlined, FileOutlined } from '@ant-design/icons'
import { isEmpty, } from '@/utils/commons';
import { v4 as uuid } from 'uuid';
import { sentMsgTypeMapped, whatsappSupportFileTypes, uploadProgressSimulate } from '@/channel/bubbleMsgUtils';
import { sentMsgTypeMapped, whatsappSupportFileTypes, uploadProgressSimulate, WABAccountsMapped } from '@/channel/bubbleMsgUtils';
import { OSS_URL as aliOSSHost, DEFAULT_WABA } from '@/config';
import { postUploadFileItem } from '@/actions/CommonActions';
import dayjs from 'dayjs';
@ -103,6 +103,7 @@ const InputComposer = ({ channel, currentActive }) => {
...msgObj,
id: `${currentConversation.sn}.${uuid()}`,
msg_source: channel,
wabaName: channel === 'waba' ? WABAccountsMapped[fromIM]?.verifiedName : '',
};
// olog('sendMessage------------------', msgObjMerge)
const contentToSend = sentMsgTypeMapped[msgObjMerge.type].contentToSend(msgObjMerge);
@ -131,6 +132,7 @@ const InputComposer = ({ channel, currentActive }) => {
...msgObj,
id: `${currentConversation.sn}.${msgObj.id}`,
msg_source: channel,
wabaName: channel === 'waba' ? WABAccountsMapped[fromIM]?.verifiedName : '',
};
// olog('invoke upload', msgObjMerge)
const contentToRender = sentMsgTypeMapped[msgObjMerge.type].contentToRender(msgObjMerge);
@ -154,6 +156,7 @@ const InputComposer = ({ channel, currentActive }) => {
...msgObj,
id: `${currentConversation.sn}.${msgObj.id}`,
msg_source: channel,
wabaName: channel === 'waba' ? WABAccountsMapped[fromIM]?.verifiedName : '',
};
const contentToSend = sentMsgTypeMapped[msgObjMerge.type].contentToSend(msgObjMerge);
// olog('invoke upload send +++ ', contentToSend)

Loading…
Cancel
Save