From 2126d4304a2caff5582dc8126303b64f06166303 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20H=C3=B6rist?= Date: Sun, 19 Mar 2017 17:58:04 +0100 Subject: [PATCH] Extend method to return our own full jid --- src/common/gajim.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/common/gajim.py b/src/common/gajim.py index ee1ba1e94..fc7fc323b 100644 --- a/src/common/gajim.py +++ b/src/common/gajim.py @@ -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():