Olá a todos!
Estou enviando uma mensagem privada através da API de usuários. usando o nome de usuário ‘system’
const postData = {
title: messageTitle,
raw: messageBody,
username: 'system',
category: 22,
target_recipients,
archetype: 'private_message',
is_warning: true,
status: 'archived',
enabled: false,
};
// start sending message
try {
const response = await fetch(endpoint, {
method: 'POST',
headers: getHeaders(),
body: JSON.stringify(postData),
});
// Convert the response to JSON
const data = await response.json();
return data;
} catch (error) {
return { errors: ['something went wrong while sending PM'] };
}
No entanto, na notificação, está mostrando ‘2 replies’
Mas na verdade não há respostas
O que é ainda mais estranho é que esse problema só ocorre quando envio uma MP do site ativo. Testar do localhost não aciona o problema.
Alguma ideia?


