fix: sync MTProto startup and egress fixes

This commit is contained in:
A 2026-07-13 19:05:41 +08:00
parent 50803a604c
commit 305e8a0008
24 changed files with 2880 additions and 317 deletions

View file

@ -49,10 +49,13 @@ func TestDispatchUnwrapsWrappers(t *testing.T) {
t.Fatalf("encode wrapped request: %v", err)
}
enc, err := r.Dispatch(context.Background(), [8]byte{}, 0, &b)
enc, method, err := r.DispatchWithMethod(context.Background(), [8]byte{}, 0, &b)
if err != nil {
t.Fatalf("dispatch: %v", err)
}
if method != "help.getConfig" {
t.Fatalf("effective method = %q, want help.getConfig", method)
}
cfg, ok := enc.(*tg.Config)
if !ok {
t.Fatalf("result type = %T, want *tg.Config", enc)