mirror of
https://github.com/openlibrecommunity/olcrtc.git
synced 2026-05-30 00:49:44 +00:00
fix(mobile): preserve raw room id for vp8 binding
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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 ||
|
||||
|
||||
Reference in New Issue
Block a user