Merge branch 'development' of github.com:siacs/Conversations into development
This commit is contained in:
commit
9a945af6b9
|
@ -288,6 +288,10 @@ public class MessageParser extends AbstractParser implements
|
||||||
.findOrCreateConversation(account,
|
.findOrCreateConversation(account,
|
||||||
packet.getAttribute("from"), true);
|
packet.getAttribute("from"), true);
|
||||||
if (!conversation.getMucOptions().online()) {
|
if (!conversation.getMucOptions().online()) {
|
||||||
|
if (x.hasChild("password")) {
|
||||||
|
Element password = x.findChild("password");
|
||||||
|
conversation.getMucOptions().setPassword(password.getContent());
|
||||||
|
}
|
||||||
mXmppConnectionService.joinMuc(conversation);
|
mXmppConnectionService.joinMuc(conversation);
|
||||||
mXmppConnectionService.updateConversationUi();
|
mXmppConnectionService.updateConversationUi();
|
||||||
}
|
}
|
||||||
|
@ -296,10 +300,14 @@ public class MessageParser extends AbstractParser implements
|
||||||
} else if (packet.hasChild("x", "jabber:x:conference")) {
|
} else if (packet.hasChild("x", "jabber:x:conference")) {
|
||||||
Element x = packet.findChild("x", "jabber:x:conference");
|
Element x = packet.findChild("x", "jabber:x:conference");
|
||||||
String jid = x.getAttribute("jid");
|
String jid = x.getAttribute("jid");
|
||||||
|
String password = x.getAttribute("password");
|
||||||
if (jid != null) {
|
if (jid != null) {
|
||||||
Conversation conversation = mXmppConnectionService
|
Conversation conversation = mXmppConnectionService
|
||||||
.findOrCreateConversation(account, jid, true);
|
.findOrCreateConversation(account, jid, true);
|
||||||
if (!conversation.getMucOptions().online()) {
|
if (!conversation.getMucOptions().online()) {
|
||||||
|
if (password != null) {
|
||||||
|
conversation.getMucOptions().setPassword(password);
|
||||||
|
}
|
||||||
mXmppConnectionService.joinMuc(conversation);
|
mXmppConnectionService.joinMuc(conversation);
|
||||||
mXmppConnectionService.updateConversationUi();
|
mXmppConnectionService.updateConversationUi();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue