add password to direct muc invite

This commit is contained in:
Daniel Gultsch 2016-10-09 19:40:03 +02:00
parent f7d51b8890
commit cd1c05a7c3
1 changed files with 4 additions and 0 deletions

View File

@ -183,6 +183,10 @@ public class MessageGenerator extends AbstractGenerator {
packet.setFrom(conversation.getAccount().getJid()); packet.setFrom(conversation.getAccount().getJid());
Element x = packet.addChild("x", "jabber:x:conference"); Element x = packet.addChild("x", "jabber:x:conference");
x.setAttribute("jid", conversation.getJid().toBareJid().toString()); x.setAttribute("jid", conversation.getJid().toBareJid().toString());
String password = conversation.getMucOptions().getPassword();
if (password != null) {
x.setAttribute("password",password);
}
return packet; return packet;
} }