back to normal invites. fixed #298

This commit is contained in:
iNPUTmice 2014-07-21 19:55:00 +02:00
parent b223784560
commit e3ebccc762

View file

@ -129,7 +129,7 @@ public class MessageGenerator {
return packet; return packet;
} }
public MessagePacket invite(Conversation conversation, String contact) { public MessagePacket directInvite(Conversation conversation, String contact) {
MessagePacket packet = new MessagePacket(); MessagePacket packet = new MessagePacket();
packet.setType(MessagePacket.TYPE_NORMAL); packet.setType(MessagePacket.TYPE_NORMAL);
packet.setTo(contact); packet.setTo(contact);
@ -138,4 +138,17 @@ public class MessageGenerator {
x.setAttribute("jid", conversation.getContactJid().split("/")[0]); x.setAttribute("jid", conversation.getContactJid().split("/")[0]);
return packet; return packet;
} }
public MessagePacket invite(Conversation conversation, String contact) {
MessagePacket packet = new MessagePacket();
packet.setTo(conversation.getContactJid().split("/")[0]);
packet.setFrom(conversation.getAccount().getFullJid());
Element x = new Element("x");
x.setAttribute("xmlns", "http://jabber.org/protocol/muc#user");
Element invite = new Element("invite");
invite.setAttribute("to", contact);
x.addChild(invite);
packet.addChild(x);
return packet;
}
} }