From ecd613dcdd4288b52fea893192c75f3e527436ea Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 7 Sep 2014 14:06:23 +0200 Subject: MUC: set the password from bookmarks. --- src/eu/siacs/conversations/services/XmppConnectionService.java | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/eu/siacs/conversations/services/XmppConnectionService.java') diff --git a/src/eu/siacs/conversations/services/XmppConnectionService.java b/src/eu/siacs/conversations/services/XmppConnectionService.java index da7ffb4dd..2b2616e28 100644 --- a/src/eu/siacs/conversations/services/XmppConnectionService.java +++ b/src/eu/siacs/conversations/services/XmppConnectionService.java @@ -1099,6 +1099,13 @@ public class XmppConnectionService extends Service { public void providePasswordForMuc(Conversation conversation, String password) { if (conversation.getMode() == Conversation.MODE_MULTI) { conversation.getMucOptions().setPassword(password); + if (conversation.getBookmark() != null && + conversation.getMucOptions().isPasswordChanged()) { + if (!conversation.getBookmark().autojoin()) { + conversation.getBookmark().setAutojoin(true); + } + pushBookmarks(conversation.getAccount()); + } joinMuc(conversation); } } -- cgit v1.2.3