perf: email 不在在线聊天页面通知

main
Lei OT 5 days ago
parent 2b344eec43
commit 2abd149655

@ -197,10 +197,10 @@ const websocketSlice = (set, get) => ({
// console.log('msgRender msgUpdate', msgRender, msgUpdate); // console.log('msgRender msgUpdate', msgRender, msgUpdate);
if (['email.updated', 'email.inbound.received',].includes(resultType)) { if (['email.updated', 'email.inbound.received',].includes(resultType)) {
updateMailboxCount({ opi_sn: msgObj.opi_sn }) updateMailboxCount({ opi_sn: msgObj.opi_sn })
if (!isEmpty(msgRender)) { // if (!isEmpty(msgRender)) {
const msgNotify = receivedMsgTypeMapped[resultType].contentToNotify(msgObj); // const msgNotify = receivedMsgTypeMapped[resultType].contentToNotify(msgObj);
addGlobalNotify(msgNotify); // addGlobalNotify(msgNotify);
} // }
return false; return false;
} }
if ([ if ([
@ -238,7 +238,9 @@ const websocketSlice = (set, get) => ({
// }, 60_000); // }, 60_000);
} }
// 会话表 更新 // 会话表 更新
if (['session.new', 'session.updated'].includes(resultType)) { if (['session.new', 'session.updated'].includes(resultType)
&& result.webhooksource !== 'email'
) {
const sessionList = receivedMsgTypeMapped[resultType].getMsg(result); const sessionList = receivedMsgTypeMapped[resultType].getMsg(result);
addToConversationList(sessionList, 'top'); addToConversationList(sessionList, 'top');
} }

Loading…
Cancel
Save