fix(mobile): preserve raw room id for vp8 binding

This commit is contained in:
Alexander Anisimov
2026-05-21 23:35:50 +03:00
parent 36d3373619
commit 5222d8a211
2 changed files with 7 additions and 11 deletions

View File

@@ -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 {

View File

@@ -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 ||