diff options
author | Michael <betheg@bitcloner.org> | 2014-09-07 14:06:23 +0200 |
---|---|---|
committer | Michael <betheg@bitcloner.org> | 2014-09-07 14:06:23 +0200 |
commit | ecd613dcdd4288b52fea893192c75f3e527436ea (patch) | |
tree | 5a09a1dc8093355fde000286f6c20ebeae713dd1 /src/eu/siacs/conversations/services/XmppConnectionService.java | |
parent | d9990e6cd8bb4f2d9bc5696019f757db8a732b1f (diff) |
MUC: set the password from bookmarks.
Diffstat (limited to 'src/eu/siacs/conversations/services/XmppConnectionService.java')
-rw-r--r-- | src/eu/siacs/conversations/services/XmppConnectionService.java | 7 |
1 files changed, 7 insertions, 0 deletions
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); } } |