diff --git a/user.go b/user.go index dfc7db2..51536cc 100644 --- a/user.go +++ b/user.go @@ -628,7 +628,7 @@ func (user *User) HandleEvent(event interface{}) { case *events.Disconnected: // Don't send the normal transient disconnect state if we're already in a different transient disconnect state. // TODO remove this if/when the phone offline state is moved to a sub-state of CONNECTED - if user.GetPrevBridgeState().Error != WAPhoneOffline { + if user.GetPrevBridgeState().Error != WAPhoneOffline && user.PhoneRecentlySeen(false) { go user.sendBridgeState(BridgeState{StateEvent: StateTransientDisconnect, Message: "Disconnected from WhatsApp. Trying to reconnect."}) } user.bridge.Metrics.TrackConnectionState(user.JID, false)