Skip to content
Snippets Groups Projects
Commit 2126d430 authored by Philipp Hörist's avatar Philipp Hörist
Browse files

Extend method to return our own full jid

parent 0eb2433c
No related branches found
No related tags found
No related merge requests found
......@@ -420,13 +420,16 @@ def jid_is_transport(jid):
return True
return False
def get_jid_from_account(account_name):
def get_jid_from_account(account_name, full=False):
"""
Return the jid we use in the given account
"""
name = config.get_per('accounts', account_name, 'name')
hostname = config.get_per('accounts', account_name, 'hostname')
jid = name + '@' + hostname
if full:
resource = connections[account_name].server_resource
jid += '/' + resource
return jid
def get_our_jids():
......
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