diff --git a/CHANGES b/CHANGES index 138c2fe..0e730e4 100644 --- a/CHANGES +++ b/CHANGES @@ -9,6 +9,8 @@ Galene 0.95.0 (unreleased) incompatible change. * Added an id to every chat message, and made it possible to remove a single chat message. + * Fixed a race condition that prevented operators from joining an + AutoKick group. 15 July 2024: Galene 0.9.1 diff --git a/group/group.go b/group/group.go index b651b68..2a9b1f9 100644 --- a/group/group.go +++ b/group/group.go @@ -693,7 +693,17 @@ func autoLockKick(g *Group) { } if g.description.Autokick { - go kickall(g, "there are no operators in this group") + // we cannot call kickall, since it requires the group to + // be unlocked. And calling it asynchronously might + // spuriously kick out an operator. + go func(clients []Client) { + for _, c := range clients { + c.Kick( + "", nil, + "there are no operators in this group", + ) + } + }(g.getClientsUnlocked(nil)) } }