refactor: sync sparse tlprofile runtime

This commit is contained in:
A 2026-07-16 21:36:32 +08:00
parent 5ecf4e912d
commit 25ab04a254
93 changed files with 2983 additions and 1615 deletions

View file

@ -44,15 +44,10 @@ func TestLegacyAndroidMessagesUploadMediaDispatch(t *testing.T) {
if err != nil {
t.Fatalf("dispatch legacy uploadMedia: %v", err)
}
// Routed through the generated static client overlay + the normal
// gotd dispatcher, which boxes a class result (MessageMedia) as *...Box.
box, ok := enc.(*tg.MessageMediaBox)
// Routed through the generated static client overlay and sparse dispatcher.
media, ok := enc.(*tg.MessageMediaPhoto)
if !ok {
t.Fatalf("response = %T, want *tg.MessageMediaBox", enc)
}
media, ok := box.MessageMedia.(*tg.MessageMediaPhoto)
if !ok {
t.Fatalf("media = %T, want messageMediaPhoto", box.MessageMedia)
t.Fatalf("response = %T, want *tg.MessageMediaPhoto", enc)
}
photo, ok := media.Photo.(*tg.Photo)
if !ok || photo.ID != 777 {