From db6f6151a1a8b38d44d36b4afa97d2a20c80a5f7 Mon Sep 17 00:00:00 2001 From: Nikos Kouremenos Date: Sun, 26 Feb 2006 14:13:13 +0000 Subject: [PATCH] introducing get_our_jids() --- src/common/gajim.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/common/gajim.py b/src/common/gajim.py index 169d3befb..f037453c0 100644 --- a/src/common/gajim.py +++ b/src/common/gajim.py @@ -250,11 +250,19 @@ def jid_is_transport(jid): return is_transport def get_jid_from_account(account_name): + '''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 return jid +def get_our_jids(): + '''returns a list of the jids we use in our accounts''' + our_jids = list() + for account in contacts.get_accounts(): + our_jids.append(get_jid_from_account(account)) + return our_jids + def get_hostname_from_account(account_name, use_srv = False): '''returns hostname (if custom hostname is used, that is returned)''' if use_srv and connections[account_name].connected_hostname: