refactor: send msg failed
This commit is contained in:
@@ -62,13 +62,13 @@ export const onMessageSendStarted = async (
|
|||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (error?.error?.status == 403) {
|
if (error?.error?.status == 403) {
|
||||||
// 403 means blocked
|
// 403 means blocked
|
||||||
// toast.error(`Failed to send, blocked maybe.`,);
|
toast.error(`Send failed, blocked maybe`);
|
||||||
dispatch(updateMessage({ mid: ts, failed: true }));
|
// dispatch(updateMessage({ mid: ts, failed: true }));
|
||||||
} else {
|
} else {
|
||||||
toast.error(`Send Message Failed ${JSON.stringify(error)}`);
|
toast.error(`Send Message Failed ${JSON.stringify(error)}`);
|
||||||
dispatch(removeContextMessage({ id, mid: ts }));
|
|
||||||
dispatch(removeMessage(ts));
|
|
||||||
}
|
}
|
||||||
|
dispatch(removeContextMessage({ id, mid: ts }));
|
||||||
|
dispatch(removeMessage(ts));
|
||||||
// patchResult.undo();
|
// patchResult.undo();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user