From 5222d8a211c0c62ffb83c9adfa35b5bcd1e2520b Mon Sep 17 00:00:00 2001 From: Alexander Anisimov Date: Thu, 21 May 2026 23:35:50 +0300 Subject: [PATCH] fix(mobile): preserve raw room id for vp8 binding --- mobile/mobile.go | 14 +++++--------- mobile/mobile_test.go | 4 ++-- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/mobile/mobile.go b/mobile/mobile.go index fd3444d..1498402 100644 --- a/mobile/mobile.go +++ b/mobile/mobile.go @@ -755,15 +755,11 @@ func validateStartArgs(carrierName, roomID, clientID, keyHex string) error { } } -func buildRoomURL(carrierName, roomID string) string { - switch carrierName { - case "telemost": - return "https://telemost.yandex.ru/j/" + roomID - case carrierWBStream: - return roomID - default: - return roomID - } +func buildRoomURL(_ string, roomID string) string { + // Keep the same RoomURL value the CLI/YAML path passes into transports. + // Auth providers may expand it for service HTTP calls, but transports + // such as vp8channel derive peer binding from the raw room value. + return roomID } func clampAtLeastOne(value, maxValue int) int { diff --git a/mobile/mobile_test.go b/mobile/mobile_test.go index 8938f4e..f16a893 100644 --- a/mobile/mobile_test.go +++ b/mobile/mobile_test.go @@ -125,7 +125,7 @@ func TestNormalizeBuildRoomAndClamp(t *testing.T) { t.Fatal("normalizeCarrier() returned unexpected value") } - if got := buildRoomURL("telemost", "abc"); got != "https://telemost.yandex.ru/j/abc" { + if got := buildRoomURL("telemost", "abc"); got != "abc" { t.Fatalf("telemost room URL = %q", got) } if got := buildRoomURL(carrierWBStream, "room"); got != "room" { @@ -213,7 +213,7 @@ func TestStartUsesDefaultsAndCheckWithInjectedRunner(t *testing.T) { }) runClientWithReady = func(ctx context.Context, cfg client.Config, onReady func()) error { - if cfg.Transport != defaultTransport || cfg.RoomURL != "https://telemost.yandex.ru/j/room" || + if cfg.Transport != defaultTransport || cfg.RoomURL != "room" || cfg.LocalAddr != "127.0.0.1:1081" || cfg.SOCKSUser != "u" || cfg.SOCKSPass != "p" || cfg.Liveness.Interval != control.DefaultInterval || cfg.Liveness.Timeout != control.DefaultTimeout ||