remove unused argument

This commit is contained in:
Henry 2021-04-22 20:00:39 +02:00 committed by Henry
parent 8811127eae
commit e6ca0ed74b
4 changed files with 5 additions and 9 deletions

View File

@ -158,7 +158,7 @@ func New(
}
}
s.StateManager = roomstate.NewManager(s.rootCtx, s.logger)
s.StateManager = roomstate.NewManager(s.logger)
s.initHandlers()

View File

@ -1,7 +1,6 @@
package roomstate
import (
"context"
"sort"
"sync"
@ -22,7 +21,7 @@ type Manager struct {
room roomStateMap
}
func NewManager(ctx context.Context, log kitlog.Logger) *Manager {
func NewManager(log kitlog.Logger) *Manager {
var m Manager
m.logger = log
m.updater, m.broadcaster = broadcasts.NewRoomChanger()

View File

@ -4,7 +4,6 @@ package admin
import (
"bytes"
"context"
"crypto/rand"
"net/http"
"net/url"
@ -72,8 +71,7 @@ func newSession(t *testing.T) *testSession {
ts.InvitesDB = new(mockdb.FakeInvitesService)
log, _ := logtest.KitLogger("admin", t)
ctx := context.TODO()
ts.RoomState = roomstate.NewManager(ctx, log)
ts.RoomState = roomstate.NewManager(log)
ts.netInfo = network.ServerEndpointDetails{
Domain: randutil.String(10),

View File

@ -4,7 +4,6 @@ package handlers
import (
"bytes"
"context"
"net/http"
"os"
"path/filepath"
@ -95,8 +94,8 @@ func setup(t *testing.T) *testSession {
}
log, _ := logtest.KitLogger("complete", t)
ctx := context.TODO()
ts.RoomState = roomstate.NewManager(ctx, log)
ts.RoomState = roomstate.NewManager(log)
// instantiate the urlTo helper (constructs urls for us!)
// the cookiejar in our custom http/tester needs a non-empty domain and scheme