Skip to content
Snippets Groups Projects
Commit 6dde2b44 authored by Yann Leboulanger's avatar Yann Leboulanger
Browse files

reconnect only previously connected account when connection manager detect the...

reconnect only previously connected account when connection manager detect the reconnection, and with correct status message. fixes #2813
parent 7e11bf11
No related branches found
No related tags found
No related merge requests found
......@@ -17,13 +17,15 @@ from common import gajim
def device_now_active(self, *args):
for connection in gajim.connections.itervalues():
if gajim.config.get_per('accounts', connection.name, 'listen_to_network_manager') and gajim.config.get_per('accounts', connection.name, 'sync_with_global_status'):
connection.change_status('online', '')
if gajim.config.get_per('accounts', connection.name,
'listen_to_network_manager') and connection.time_to_reconnect:
connection._reconnect()
def device_no_longer_active(self, *args):
for connection in gajim.connections.itervalues():
if gajim.config.get_per('accounts', connection.name, 'listen_to_network_manager') and gajim.config.get_per('accounts', connection.name, 'sync_with_global_status'):
connection.change_status('offline', '')
if gajim.config.get_per('accounts', connection.name,
'listen_to_network_manager') and connection.connected > 1:
connection._disconnectedReconnCB()
from common.dbus_support import system_bus
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment