mirror of
https://github.com/jech/galene.git
synced 2024-11-10 02:35:58 +01:00
Don't duplicate username in call to addClient.
This commit is contained in:
parent
208f023d9e
commit
917fa33d38
2 changed files with 4 additions and 4 deletions
4
group.go
4
group.go
|
@ -203,13 +203,13 @@ type userid struct {
|
|||
username string
|
||||
}
|
||||
|
||||
func addClient(name string, c client, user, pass string) (*group, error) {
|
||||
func addClient(name string, c client, pass string) (*group, error) {
|
||||
g, err := addGroup(name, nil)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
perms, err := getPermission(g.description, user, pass)
|
||||
perms, err := getPermission(g.description, c.Username(), pass)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
@ -647,7 +647,7 @@ func startClient(conn *websocket.Conn) (err error) {
|
|||
c.writerDone = make(chan struct{})
|
||||
go clientWriter(conn, c.writeCh, c.writerDone)
|
||||
|
||||
g, err := addClient(m.Group, c, m.Username, m.Password)
|
||||
g, err := addClient(m.Group, c, m.Password)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
@ -975,7 +975,7 @@ func handleClientMessage(c *webClient, m clientMessage) error {
|
|||
group: c.group,
|
||||
id: "recording",
|
||||
}
|
||||
_, err := addClient(c.group.name, disk, "", "")
|
||||
_, err := addClient(c.group.name, disk, "")
|
||||
if err != nil {
|
||||
disk.Close()
|
||||
return c.error(err)
|
||||
|
|
Loading…
Reference in a new issue