Merge pull request #176 from covespace/fix_stop_status_error

let userStop to false before sendMessage
This commit is contained in:
boob.yang 2023-06-09 12:10:36 +08:00 committed by GitHub
commit 2861f59a74
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -153,6 +153,8 @@ export async function handlerResponseText(partialDataText: string, chatResponse:
// 重构后的sendMessage函数
export async function sendMessageBase(message: any, handlePartialData: (data: { command: string, text: string, user: string, date: string}) => void): Promise<{ command: string, text: string, hash: string, user: string, date: string, isError: boolean }|undefined> {
userStop = false;
const chatOptions: any = {};
const parsedMessage = await parseMessageAndSetOptions(message, chatOptions);