green-api / issues

9 stars 0 forks source link

Ошибка в ответе методов GetChatHistory, GetMessage / Error in the response of the GetChatHistory, GetMessage methods #505

Open EscHelpNew opened 2 months ago

EscHelpNew commented 2 months ago

Ошибка

  1. При отправке сообщений через API на номер не зарегистрированный в WhatsApp и последующем вызове метода GetChatHistory, GetMessage возвращается не полный объект типа:
    {
    "type": "outgoing",
    "typeMessage": ""
    }
  2. При запросе методов GetChatHistory, GetMessage сразу после отправки сообщения может быть не корректный ответ

Уровень API

Обходное решение Проверять полученный объект на наличие поля chatId, если поле отсутствует, то считать сообщение не доставленным


Error

  1. 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": ""
    }
  2. 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