mirror of
https://github.com/strukturag/nextcloud-spreed-signaling.git
synced 2023-10-21 07:33:40 -05:00
Pass backend when fetching room for managing virtual sessions.
The internal room id is different depending on the backend.
This commit is contained in:
+14
@@ -47,6 +47,20 @@ const (
|
||||
testTimeout = 10 * time.Second
|
||||
)
|
||||
|
||||
// Only used for testing.
|
||||
func (h *Hub) getRoom(id string) *Room {
|
||||
h.ru.RLock()
|
||||
defer h.ru.RUnlock()
|
||||
// TODO: The same room might exist on different backends.
|
||||
for _, room := range h.rooms {
|
||||
if room.Id() == id {
|
||||
return room
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func getTestConfig(server *httptest.Server) (*goconf.ConfigFile, error) {
|
||||
config := goconf.NewConfigFile()
|
||||
u, err := url.Parse(server.URL)
|
||||
|
||||
Reference in New Issue
Block a user