Skip to content

Commit 65f19ba

Browse files
committed
markup: fix web_app conflict with switch_inline_query_current_chat
1 parent b8cc28a commit 65f19ba

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

markup.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -240,12 +240,12 @@ type InlineButton struct {
240240
}
241241

242242
// MarshalJSON implements json.Marshaler interface.
243-
// It needed to avoid InlineQueryChat and Login fields conflict.
244-
// If you have Login field in your button, InlineQueryChat must be skipped.
243+
// It needed to avoid InlineQueryChat and Login or WebApp fields conflict.
244+
// If you have Login or WebApp field in your button, InlineQueryChat must be skipped.
245245
func (t *InlineButton) MarshalJSON() ([]byte, error) {
246246
type IB InlineButton
247247

248-
if t.Login != nil {
248+
if t.Login != nil || t.WebApp != nil {
249249
return json.Marshal(struct {
250250
IB
251251
InlineQueryChat string `json:"switch_inline_query_current_chat,omitempty"`

0 commit comments

Comments
 (0)