Telegram.Bot icon indicating copy to clipboard operation
Telegram.Bot copied to clipboard

Had to manually set CallbackData to Null for Switch_inline to be recognized by telegram

Open walker93 opened this issue 9 years ago • 0 comments

When using "Switch to PM" and an inlinekeyboardbutton to switch back inline if you set the SwitchInlineQuery parameter only it will not be recognized (no arrow in the upper right corner of the button) by telegram as a button to go inline.

The cause of this is that this line automatically set the optional callbackdata to the button text if it is not specified.

I had to manually set the callbackdata parameter to Null after I initialized the Inlinebutton in order to be properly recognized.

I think this shouldn't be the case, because an optional parameter is automatically set by the api without the user awareness.

NuGet Package Version: 11.0.0 beta 4

.NET Version: 4.5.2

IDE: VS Community 2015

App: Console Application

walker93 avatar Dec 21 '16 22:12 walker93