perf: 发送失败: 灰度用户 不显示系统消息

dev/timezone
Lei OT 1 year ago
parent 84b17cc982
commit c4edd048f5

@ -233,11 +233,11 @@ const whatsappMsgMapped = {
return isEmpty(result?.whatsappMessage) ? null : { ...result.whatsappMessage, conversationid: result.conversationid, messageorigin: result.messageorigin };
},
contentToRender: (contentObj) => {
if ((contentObj?.status === 'failed' ) && contentObj.errorCode !== 'BAD_REQUEST') {
if (contentObj?.status === 'failed' && ['130472', 'BAD_REQUEST'].includes(contentObj.errorCode)) {
contentObj = {
...contentObj,
type: 'error',
text: {body: `${whatsappError?.[contentObj.errorCode] || contentObj.errorMessage}` }, // contentObj.errorMessage // Message failed to send.
text: { body: `${whatsappError?.[contentObj.errorCode] || contentObj.errorMessage}` }, // contentObj.errorMessage // Message failed to send.
id: contentObj.id,
wamid: contentObj.id,
};

Loading…
Cancel
Save