aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/services/XmppConnectionService.java
diff options
context:
space:
mode:
authorMichael <betheg@bitcloner.org>2014-09-07 14:06:23 +0200
committerMichael <betheg@bitcloner.org>2014-09-07 14:06:23 +0200
commitecd613dcdd4288b52fea893192c75f3e527436ea (patch)
tree5a09a1dc8093355fde000286f6c20ebeae713dd1 /src/eu/siacs/conversations/services/XmppConnectionService.java
parentd9990e6cd8bb4f2d9bc5696019f757db8a732b1f (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.java7
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 da7ffb4d..2b2616e2 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);
}
}