Commit d64b578c authored by Philipp Hörist's avatar Philipp Hörist

Client: Never allow Client.status to be 'offline'

status should be used to track our presence show value only

All code should depend on ClientState to determine if we are offline
parent ad53f214
......@@ -71,7 +71,7 @@ class Client(ConnectionHandlers):
self.roster_supported = True
self._state = ClientState.DISCONNECTED
self._status = 'offline'
self._status = 'online'
self._status_message = ''
self._reconnect = True
......@@ -241,7 +241,6 @@ class Client(ConnectionHandlers):
OurShowEvent(None, conn=self, show='error'))
else:
self._status = 'offline'
self.get_module('Chatstate').enabled = False
app.nec.push_incoming_event(OurShowEvent(
None, conn=self, show='offline'))
......@@ -307,7 +306,8 @@ class Client(ConnectionHandlers):
if not msg:
msg = ''
self._status = show
if show != 'offline':
self._status = show
self._status_message = msg
if self._state.is_disconnecting:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment