|
|
|
@ -10,7 +10,7 @@ import useAuthStore from '@/stores/AuthStore';
|
|
|
|
|
import LexicalEditor from '@/components/LexicalEditor';
|
|
|
|
|
|
|
|
|
|
import { v4 as uuid } from 'uuid';
|
|
|
|
|
import { isEmpty } from '@/utils/commons';
|
|
|
|
|
import { cloneDeep, isEmpty } from '@/utils/commons';
|
|
|
|
|
import './EmailEditor.css';
|
|
|
|
|
import { postSendEmail } from '@/actions/EmailActions';
|
|
|
|
|
import { sentMsgTypeMapped, } from '@/channel/bubbleMsgUtils';
|
|
|
|
@ -323,13 +323,19 @@ const EmailEditorPopup = ({ open, setOpen, fromEmail, fromUser, toEmail, convers
|
|
|
|
|
body.externalID = stickToCid;
|
|
|
|
|
body.actionID = `${stickToCid}.${msgObj.id}`;
|
|
|
|
|
try {
|
|
|
|
|
const bubbleMsg = cloneDeep(msgObj);
|
|
|
|
|
bubbleMsg.id = `${stickToCid}.${msgObj.id}`;
|
|
|
|
|
bubbleMsg.email.mai_sn = '';
|
|
|
|
|
bubbleMsg.content = undefined;
|
|
|
|
|
invokeEmailMessage(bubbleMsg);
|
|
|
|
|
|
|
|
|
|
const result = await postSendEmail(body);
|
|
|
|
|
setSendLoading(false);
|
|
|
|
|
const mailSavedId = result.id || '';
|
|
|
|
|
msgObj.id = `${stickToCid}.${msgObj.id}`;
|
|
|
|
|
msgObj.email.mai_sn = mailSavedId;
|
|
|
|
|
// const mailSavedId = result.id || '';
|
|
|
|
|
// bubbleMsg.email.mai_sn = mailSavedId;
|
|
|
|
|
// invokeEmailMessage(bubbleMsg);
|
|
|
|
|
|
|
|
|
|
// setSendLoading(false);
|
|
|
|
|
|
|
|
|
|
invokeEmailMessage(msgObj);
|
|
|
|
|
setOpen(false);
|
|
|
|
|
} catch (error) {
|
|
|
|
|
notification.error({
|
|
|
|
|