summaryrefslogtreecommitdiff
path: root/src/bookmark.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2012-12-20 18:50:34 +0100
committermathieui <mathieui@mathieui.net>2012-12-20 18:50:34 +0100
commit2a980838a9ccc576fe1699f047e00b783ccf7e7b (patch)
treed6fb04884173e63a6a3905343e9271602e069746 /src/bookmark.py
parent519f3afe06a8635b7471850a1c330604a14eb95e (diff)
downloadpoezio-2a980838a9ccc576fe1699f047e00b783ccf7e7b.tar.gz
poezio-2a980838a9ccc576fe1699f047e00b783ccf7e7b.tar.bz2
poezio-2a980838a9ccc576fe1699f047e00b783ccf7e7b.tar.xz
poezio-2a980838a9ccc576fe1699f047e00b783ccf7e7b.zip
Fix #2186 (muc password in the config file)
Also use the passwords on start, and automatically use a password with /join if there is one.
Diffstat (limited to 'src/bookmark.py')
-rw-r--r--src/bookmark.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/bookmark.py b/src/bookmark.py
index 8d84022d..c9659cd2 100644
--- a/src/bookmark.py
+++ b/src/bookmark.py
@@ -73,6 +73,8 @@ class Bookmark(object):
if self.nick:
local += '/%s' % self.nick
local += ':'
+ if self.password:
+ config.set_and_save('password', self.password, section=self.jid)
return local
def parse_from_element(el, method=None):
@@ -211,6 +213,7 @@ def get_local():
nick = jid.resource
else:
nick = None
- b = Bookmark(jid.bare, autojoin=True, nick=nick, method='local')
+ passwd = config.get_by_tabname('password', '', jid.bare, fallback=False) or None
+ b = Bookmark(jid.bare, autojoin=True, nick=nick, password=passwd, method='local')
if not get_by_jid(b.jid):
bookmarks.append(b)