Skip to content

Неверно парсится клавиатура чата [v.1.0.15] #284

Description

@thevalidator

Делаю запрос:

Keyboard keyboard = vk.messages()
    .getConversationsById(actor, peerId).execute()
    .getItems().get(0).getCurrentKeyboard();

Получаю ответ, а клавиатура недораспарсилась и находится в таком состоянии:

"current_keyboard": {
      "author_id": peerId,
      "buttons": [
        [
          {
            "action": {},
            "color": "positive"
          },
          {
            "action": {},
            "color": "default"
          },
          {
            "action": {},
            "color": "default"
          }
        ]
      ],
      "inline": false,
      "one_time": true
    }

А должна быть такой (в таком виде она приходит):

"current_keyboard": {
            "one_time": true,
            "buttons": [
              [
                {
                  "action": {
                    "label": "1",
                    "type": "text",
                    "payload": "1"
                  },
                  "color": "positive"
                },
                {
                  "action": {
                    "label": "2",
                    "type": "text",
                    "payload": "2"
                  },
                  "color": "default"
                },
                {
                  "action": {
                    "label": "3",
                    "type": "text",
                    "payload": "3"
                  },
                  "color": "default"
                }
              ]
            ],
            "author_id": peerId,
            "inline": false
          }

При десериализации из json в pojo, что-то идет не так и клавиатура неверно парсится

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions