Ensure autolocked groups are locked on creation.
We used to autolock groups when the last user left, but not when creating a group that was not in memory yet. Ensure that groups are autolocked in all cases. Thanks to Michael Ströder.
This commit is contained in:
@@ -1,5 +1,7 @@
|
|||||||
Galene 0.6.1 (unreleased):
|
Galene 0.6.1 (unreleased):
|
||||||
|
|
||||||
|
* Ensure that autolocked groups are locked on creation. Thanks to
|
||||||
|
Michael Ströder.
|
||||||
* Add a camera/microphone indicator in the users list.
|
* Add a camera/microphone indicator in the users list.
|
||||||
* Hide audio-only peers by default.
|
* Hide audio-only peers by default.
|
||||||
|
|
||||||
|
|||||||
+3
-7
@@ -433,20 +433,16 @@ func add(name string, desc *Description) (*Group, []Client, error) {
|
|||||||
timestamp: time.Now(),
|
timestamp: time.Now(),
|
||||||
}
|
}
|
||||||
groups.groups[name] = g
|
groups.groups[name] = g
|
||||||
return g, nil, nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
g.mu.Lock()
|
g.mu.Lock()
|
||||||
defer g.mu.Unlock()
|
defer g.mu.Unlock()
|
||||||
|
|
||||||
if desc != nil {
|
if desc != nil {
|
||||||
if descriptionMatch(g.description, desc) {
|
if !descriptionMatch(g.description, desc) {
|
||||||
return g, nil, nil
|
|
||||||
}
|
|
||||||
g.description = desc
|
g.description = desc
|
||||||
} else if descriptionUnchanged(name, g.description) {
|
}
|
||||||
return g, nil, nil
|
} else if !descriptionUnchanged(name, g.description) {
|
||||||
} else {
|
|
||||||
desc, err = readDescription(name)
|
desc, err = readDescription(name)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if !os.IsNotExist(err) {
|
if !os.IsNotExist(err) {
|
||||||
|
|||||||
Reference in New Issue
Block a user