Skip to content

Commit

Permalink
fix: InlineKeyboardButton extended with WebApp and other new fields -…
Browse files Browse the repository at this point in the history
… webapp => web_app
  • Loading branch information
trakhimenok committed Aug 28, 2024
1 parent 071d860 commit cddcada
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions tgbotapi/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ type KeyboardButton struct {
RequestContact bool `json:"request_contact"`
RequestLocation bool `json:"request_location"`
RequestPoll *KeyboardButtonPollType `json:"request_poll,omitempty"`
Webapp *WebappInfo `json:"webapp,omitempty"`
Webapp *WebappInfo `json:"web_app,omitempty"`
}

// Validate checks if the keyboard button is valid
Expand Down Expand Up @@ -561,7 +561,7 @@ type InlineKeyboardButton struct {
Text string `json:"text"`
URL string `json:"url,omitempty"`
CallbackData string `json:"callback_data,omitempty"`
WebApp *WebappInfo `json:"webapp,omitempty"`
WebApp *WebappInfo `json:"web_app,omitempty"`
LoginUrl *LoginUrl `json:"login_url,omitempty"`
SwitchInlineQuery *string `json:"switch_inline_query,omitempty"` // we use pointer as empty string is non zero value in this case
SwitchInlineQueryCurrentChat *string `json:"switch_inline_query_current_chat,omitempty"` // we use pointer as empty string is non zero value in this case
Expand Down
12 changes: 6 additions & 6 deletions tgbotapi/types_ffjson.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit cddcada

Please sign in to comment.