Fix crash on bumping non-existent occupant

This commit is contained in:
Bohdan Horbeshko 2025-07-25 08:22:38 -04:00
parent f9be86b5db
commit cb6eaef16f

View file

@ -759,7 +759,9 @@ func (c *Client) mucCacheHasOccupant(mucID int64, memberID int64) bool {
}
occupant, ok := mucState.Occupants.Get(memberID)
mucState.Occupants.Bump(occupant)
if ok {
mucState.Occupants.Bump(occupant)
}
return ok
}