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

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

parent 4d089f62
......@@ -2936,7 +2936,8 @@ def __init__(self):
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 @@ def gnome_screensaver_ActiveChanged_cb(active):
not gajim.sleeper_state[account]:
if gajim.sleeper_state[account] == 'online':
if not gajim.account_is_connected(account):
# we save out online status
gajim.status_before_autoaway[account] = \
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