Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
thevalidator opened this issue Jan 2, 2024 · 0 comments

Comments

@thevalidator
Copy link

thevalidator commented Jan 2, 2024

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

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, что-то идет не так и клавиатура неверно парсится

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant