refactor: send msg failed

This commit is contained in:
Tristan Yang
2023-07-19 20:34:00 +08:00
parent 42bfdfd71b
commit 6971b34362
+3 -3
View File
@@ -62,13 +62,13 @@ export const onMessageSendStarted = async (
} catch (error) {
if (error?.error?.status == 403) {
// 403 means blocked
// toast.error(`Failed to send, blocked maybe.`,);
dispatch(updateMessage({ mid: ts, failed: true }));
toast.error(`Send failed, blocked maybe`);
// dispatch(updateMessage({ mid: ts, failed: true }));
} else {
toast.error(`Send Message Failed ${JSON.stringify(error)}`);
}
dispatch(removeContextMessage({ id, mid: ts }));
dispatch(removeMessage(ts));
}
// patchResult.undo();
}
};