-
Notifications
You must be signed in to change notification settings - Fork 908
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
Markup.button.callback() doesn't work with hide = true #1902
Comments
It's a normal behavior See markup.ts:130 |
Not sure that I understand you. |
Of course I understood, only that the hide parameter does not add parameters to the button object of the resulting array, but rather it literally removes the button object from the resulting array |
Should we remove the feature in v5? I would settle for allowing // you have a list of optional { name?: string, id?: string }
const markup = list.map(x => x && x.id && Markup.button.callback(x.name, x.id)); Instead of today: const markup = list.map(x => Markup.button.callback(x.name || "", x.id || "", Boolean(x.id))); Is there even a case where |
Context
Minimal Example Code Reproducing the Issue
Markup.inlineKeyboard([[Markup.button.callback(
NAME,
DATA, true)]]).reply_markup
Expected Behavior
Keyboard array
Current Behavior
Empty array
If we remove the third (hide) parameter
Markup.inlineKeyboard([[Markup.button.callback(
NAME,
DATA)]]).reply_markup
then everything works fine
The text was updated successfully, but these errors were encountered: