aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs
diff options
context:
space:
mode:
authoriNPUTmice <daniel@gultsch.de>2014-09-06 18:21:38 +0200
committeriNPUTmice <daniel@gultsch.de>2014-09-06 18:21:38 +0200
commit9a945af6b9df40102402f593f57c125fc005f04e (patch)
tree0e8068fc36fc1f3a8359982b02872407a591ad87 /src/eu/siacs
parent0e5a0a07fd32d185d2d4c43df9494fafcace9208 (diff)
parentdfc5942bda1088e75d1ad3bae8af4810e6a5aceb (diff)
Merge branch 'development' of github.com:siacs/Conversations into development
Diffstat (limited to 'src/eu/siacs')
-rw-r--r--src/eu/siacs/conversations/parser/MessageParser.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/eu/siacs/conversations/parser/MessageParser.java b/src/eu/siacs/conversations/parser/MessageParser.java
index 938ccc16..ca029e9d 100644
--- a/src/eu/siacs/conversations/parser/MessageParser.java
+++ b/src/eu/siacs/conversations/parser/MessageParser.java
@@ -288,6 +288,10 @@ public class MessageParser extends AbstractParser implements
.findOrCreateConversation(account,
packet.getAttribute("from"), true);
if (!conversation.getMucOptions().online()) {
+ if (x.hasChild("password")) {
+ Element password = x.findChild("password");
+ conversation.getMucOptions().setPassword(password.getContent());
+ }
mXmppConnectionService.joinMuc(conversation);
mXmppConnectionService.updateConversationUi();
}
@@ -296,10 +300,14 @@ public class MessageParser extends AbstractParser implements
} else if (packet.hasChild("x", "jabber:x:conference")) {
Element x = packet.findChild("x", "jabber:x:conference");
String jid = x.getAttribute("jid");
+ String password = x.getAttribute("password");
if (jid != null) {
Conversation conversation = mXmppConnectionService
.findOrCreateConversation(account, jid, true);
if (!conversation.getMucOptions().online()) {
+ if (password != null) {
+ conversation.getMucOptions().setPassword(password);
+ }
mXmppConnectionService.joinMuc(conversation);
mXmppConnectionService.updateConversationUi();
}