Commit 05c63682 authored by Yann Leboulanger's avatar Yann Leboulanger

do not try to go autoaway or come back from autoaway if we are not connected. See #8062

parent 4d089f62
......@@ -2936,7 +2936,8 @@ class Interface:
def gnome_screensaver_ActiveChanged_cb(active):
if not active:
for account in gajim.connections:
if gajim.sleeper_state[account] == 'autoaway-forced':
if gajim.account_is_connected(account) and \
gajim.sleeper_state[account] == 'autoaway-forced':
# We came back online ofter gnome-screensaver
# autoaway
self.roster.send_status(account, 'online',
......@@ -2952,6 +2953,8 @@ class Interface:
not gajim.sleeper_state[account]:
continue
if gajim.sleeper_state[account] == 'online':
if not gajim.account_is_connected(account):
continue
# we save out online status
gajim.status_before_autoaway[account] = \
gajim.connections[account].status
......
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