diff --git a/src/views/Conversations/Online/Input/InputComposer.jsx b/src/views/Conversations/Online/Input/InputComposer.jsx index f990132..1bf75ba 100644 --- a/src/views/Conversations/Online/Input/InputComposer.jsx +++ b/src/views/Conversations/Online/Input/InputComposer.jsx @@ -8,7 +8,7 @@ import { SendOutlined, CloseCircleOutlined, LoadingOutlined, FileOutlined } from import { isEmpty, } from '@/utils/commons'; import { v4 as uuid } from 'uuid'; import { sentMsgTypeMapped, whatsappSupportFileTypes, uploadProgressSimulate } from '@/channel/bubbleMsgUtils'; -import { OSS_URL as aliOSSHost } from '@/config'; +import { OSS_URL as aliOSSHost, DEFAULT_WABA } from '@/config'; import { postUploadFileItem } from '@/actions/CommonActions'; import dayjs from 'dayjs'; import useStyleStore from '@/stores/StyleStore'; @@ -55,17 +55,18 @@ const InputComposer = ({ channel, currentActive }) => { ? 'Enter 发送, Shift+Enter 换行' : 'Enter 换行'; - const [fromIM, setFromIM] = useState(''); + const [fromIM, setFromIM] = useState(DEFAULT_WABA); useEffect(() => { switch (channel) { case 'waba': - setFromIM(whatsAppBusiness) + setFromIM(whatsAppBusiness || DEFAULT_WABA) break case 'wa': setFromIM('') // todo: 个人WhatsApp号 break default: + setFromIM(DEFAULT_WABA) break }