Add back ServerRegion and ServerVersion (#1650)

clients are still dependent on them
This commit is contained in:
David Zhao
2023-04-23 23:10:00 -07:00
committed by GitHub
parent 1cb189a3dd
commit 279b3604c3
2 changed files with 7 additions and 5 deletions
+5 -3
View File
@@ -761,9 +761,11 @@ func (r *Room) createJoinResponseLocked(participant types.LocalParticipant, iceS
SubscriberPrimary: participant.SubscriberAsPrimary(),
ClientConfiguration: participant.GetClientConfiguration(),
// sane defaults for ping interval & timeout
PingInterval: 10,
PingTimeout: 20,
ServerInfo: r.serverInfo,
PingInterval: 10,
PingTimeout: 20,
ServerInfo: r.serverInfo,
ServerVersion: r.serverInfo.Version,
ServerRegion: r.serverInfo.Region,
}
}
+2 -2
View File
@@ -678,8 +678,8 @@ func TestRoomUpdate(t *testing.T) {
// p1 should have received an update
time.Sleep(2 * defaultDelay)
require.Equal(t, 1, p1.SendRoomUpdateCallCount())
require.EqualValues(t, 2, p1.SendRoomUpdateArgsForCall(0).NumParticipants)
require.GreaterOrEqual(t, p1.SendRoomUpdateCallCount(), 1)
require.EqualValues(t, 2, p1.SendRoomUpdateArgsForCall(p1.SendRoomUpdateCallCount()-1).NumParticipants)
})
t.Run("participants should receive metadata update", func(t *testing.T) {