perf(WAI): outbound Status

dev/RoosterEditor
Lei OT 1 month ago
parent d7f1af1d49
commit 769fa76831

@ -71,7 +71,8 @@ const uniqueMsgId = msg => (msg.id && msg.direction ? `${directionPrefix[msg.dir
*/
const webhookBodyBuilder = (messageData, messageType) => {
const defaultContent = { id: '', from: '', to: '', externalId: '', type: '', direction: '', status: '' };
const status = messageData.direction === 'inbound' ? '' : statusMapped?.[messageData.status] || messageData.status || '';
const outboundStatus = statusMapped?.[messageData.status] || messageData.status || '';
const status = messageData.direction === 'inbound' ? '' : outboundStatus;
const errors = messageData.status === 'error' ? { errorMessage: '未知错误', errorCode: '' } : {};
const message = {
id: `evt_${generateId().replace(/-/g, '')}`,

Loading…
Cancel
Save