Skip to content
Snippets Groups Projects
Commit 7495464d authored by dkirov's avatar dkirov
Browse files

if jid is not a conntact, open-chat with first connected account

parent 7e69565a
No related branches found
No related tags found
No related merge requests found
......@@ -214,6 +214,7 @@ class SignalObject(DbusPrototype):
if len(accounts) == 1:
account = accounts[0]
connected_account = None
first_connected = None
for acct in accounts:
if gajim.connections[acct].connected > 1: # account is online
if self.plugin.windows[acct]['chats'].has_key(jid):
......@@ -227,6 +228,13 @@ class SignalObject(DbusPrototype):
# or there is only one account
elif account:
connected_account = acct
elif first_connected is None:
first_connected = acct
# if jid is not a conntact, open-chat with first connected account
if connected_account is None and first_connected:
connected_account = first_connected
if connected_account:
self.plugin.roster.new_chat_from_jid(connected_account, jid)
# preserve the 'steal focus preservation'
......
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