При отправке сообщений через API на номер не зарегистрированный в WhatsApp и последующем вызове метода GetChatHistory, GetMessage возвращается не полный объект типа:
{
"type": "outgoing",
"typeMessage": ""
}
При запросе методов GetChatHistory, GetMessage сразу после отправки сообщения может быть не корректный ответ
Уровень
API
Обходное решение
Проверять полученный объект на наличие поля chatId, если поле отсутствует, то считать сообщение не доставленным
Error
When sending messages via the API to a number not registered with WhatsApp and then calling the method GetChatHistory, GetMessage an incomplete object of type is returned:
{
"type": "outgoing",
"typeMessage": ""
}
When requesting the GetChatHistory, GetMessage methods immediately after sending a message, there may be an incorrect response
Level
API
Workaround
Check the received object for the presence of the chatId field; if the field is missing, then consider the message undeliverable
Ошибка
Уровень API
Обходное решение Проверять полученный объект на наличие поля
chatId
, если поле отсутствует, то считать сообщение не доставленнымError
When sending messages via the API to a number not registered with WhatsApp and then calling the method GetChatHistory, GetMessage an incomplete object of type is returned:
When requesting the GetChatHistory, GetMessage methods immediately after sending a message, there may be an incorrect response
Level API
Workaround Check the received object for the presence of the
chatId
field; if the field is missing, then consider the message undeliverable