From 7dfdcd02e617813303423dccd0538cfce378e7fd Mon Sep 17 00:00:00 2001 From: Lei OT Date: Tue, 10 Dec 2024 16:48:24 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=BB=98=E8=AE=A4=E7=9A=84WABA=E5=8F=B7?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/Conversations/Online/Input/InputComposer.jsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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 }