Philipp Hörist pushed to branch master at gajim / gajim

Commits:
093ba8dd by Philipp Hörist at 2018-05-10T10:53:56+02:00
Provide method to get the account name from a jid

- - - - -


1 changed file:

- gajim/common/app.py


Changes:

=====================================
gajim/common/app.py
=====================================
--- a/gajim/common/app.py
+++ b/gajim/common/app.py
@@ -483,6 +483,11 @@ def get_jid_from_account(account_name):
     jid = name + '@' + hostname
     return jid
 
+def get_account_from_jid(jid):
+    for account in app.config.get_per('accounts'):
+        if jid == get_jid_from_account(account):
+            return jid
+
 def get_our_jids():
     """
     Returns a list of the jids we use in our accounts



View it on GitLab: 
https://dev.gajim.org/gajim/gajim/commit/093ba8dd97716d41e1d53f4db170dc7410fdef5f

---
View it on GitLab: 
https://dev.gajim.org/gajim/gajim/commit/093ba8dd97716d41e1d53f4db170dc7410fdef5f
You're receiving this email because of your account on dev.gajim.org.
_______________________________________________
Commits mailing list
Commits@gajim.org
https://lists.gajim.org/cgi-bin/listinfo/commits

Reply via email to