diff --git a/peer/cwtch_peer.go b/peer/cwtch_peer.go index 2dab063..8e924ac 100644 --- a/peer/cwtch_peer.go +++ b/peer/cwtch_peer.go @@ -811,6 +811,10 @@ func (cp *cwtchPeer) eventHandler() { cp.mutex.Unlock() case event.ServerStateChange: cp.mutex.Lock() + // We update both the server contact status, as well as the groups the server belongs to + cp.Profile.Contacts[ev.Data[event.GroupServer]].State = ev.Data[event.ConnectionState] + + // TODO deprecate this, the UI should consult the server contact entry instead (it's far more efficient) for _, group := range cp.Profile.Groups { if group.GroupServer == ev.Data[event.GroupServer] { group.State = ev.Data[event.ConnectionState]