deps: bump github.com/iamxvbaba/td to v1.3.2
Matches upstream owpengram/owpengram-server's version. v1.3.2 collapses the old per-kind KeyboardButtonClass sum type (KeyboardButton, KeyboardButtonURL, KeyboardButtonCallback, KeyboardButtonRequestPeer, ...) into two unified structs mirroring Telegram's actual current MTProto layer: KeyboardButton (reply keyboards) and KeyboardInlineButton (inline keyboards), each carrying a Text/Style pair plus a Type field (ButtonTypeClass / InlineButtonTypeClass) that now holds what used to be the concrete Go type. Migrated the two call sites (internal/rpc/convert_markup.go, internal/rpc/bots_longtail.go) and their tests to the new shape. Behavior is unchanged -- every button kind (callback, url, url_auth, web_view, switch_inline, copy, request_phone, request_geo_location, request_poll, request_peer, simple_web_view) still round-trips the same domain fields, just read from/written to Type instead of the button's own concrete type. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
parent
ecdb14aaca
commit
7fef8438c5
9 changed files with 166 additions and 174 deletions
|
|
@ -252,9 +252,9 @@ func TestBotsLongtailCommercialAndSettingsStubs(t *testing.T) {
|
|||
}
|
||||
if _, err := f.router.onBotsRequestWebViewButton(botCtx, &tg.BotsRequestWebViewButtonRequest{
|
||||
UserID: inputUser(f.owner),
|
||||
Button: &tg.KeyboardButtonSimpleWebView{
|
||||
Button: tg.KeyboardButton{
|
||||
Text: "Open",
|
||||
URL: "https://example.com/app",
|
||||
Type: &tg.ButtonTypeSimpleWebView{URL: "https://example.com/app"},
|
||||
},
|
||||
}); !tgerr.Is(err, "BUTTON_DATA_INVALID") {
|
||||
t.Fatalf("request webview button err = %v, want BUTTON_DATA_INVALID", err)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue