Ciao a tutti!
Sto inviando un messaggio privato tramite l’API utente. usando il nome utente ‘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'] };
}
Tuttavia, nella notifica, viene visualizzato ‘2 risposte’
Ma in realtà non ci sono risposte
Ciò che è ancora più strano è che questo problema si verifica solo quando invio un PM dal sito live. Il test da localhost non innesca il problema.
Qualche idea?


