Extend method to return our own full jid
This commit is contained in:
parent
0eb2433c17
commit
2126d4304a
1 changed files with 4 additions and 1 deletions
|
@ -420,13 +420,16 @@ def jid_is_transport(jid):
|
||||||
return True
|
return True
|
||||||
return False
|
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
|
Return the jid we use in the given account
|
||||||
"""
|
"""
|
||||||
name = config.get_per('accounts', account_name, 'name')
|
name = config.get_per('accounts', account_name, 'name')
|
||||||
hostname = config.get_per('accounts', account_name, 'hostname')
|
hostname = config.get_per('accounts', account_name, 'hostname')
|
||||||
jid = name + '@' + hostname
|
jid = name + '@' + hostname
|
||||||
|
if full:
|
||||||
|
resource = connections[account_name].server_resource
|
||||||
|
jid += '/' + resource
|
||||||
return jid
|
return jid
|
||||||
|
|
||||||
def get_our_jids():
|
def get_our_jids():
|
||||||
|
|
Loading…
Add table
Reference in a new issue