aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoriNPUTmice <daniel@gultsch.de>2014-07-21 19:55:00 +0200
committeriNPUTmice <daniel@gultsch.de>2014-07-21 19:55:00 +0200
commite3ebccc76213beba3bfe692d42533ae99726278c (patch)
treeac6d79e5aeab92bbf7d1ee5fd8f1d82562f8338b
parentb223784560be1804163fe6bec02aba02b2093b41 (diff)
back to normal invites. fixed #298
-rw-r--r--src/eu/siacs/conversations/generator/MessageGenerator.java15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/eu/siacs/conversations/generator/MessageGenerator.java b/src/eu/siacs/conversations/generator/MessageGenerator.java
index 3195c953..4885177c 100644
--- a/src/eu/siacs/conversations/generator/MessageGenerator.java
+++ b/src/eu/siacs/conversations/generator/MessageGenerator.java
@@ -129,7 +129,7 @@ public class MessageGenerator {
return packet;
}
- public MessagePacket invite(Conversation conversation, String contact) {
+ public MessagePacket directInvite(Conversation conversation, String contact) {
MessagePacket packet = new MessagePacket();
packet.setType(MessagePacket.TYPE_NORMAL);
packet.setTo(contact);
@@ -138,4 +138,17 @@ public class MessageGenerator {
x.setAttribute("jid", conversation.getContactJid().split("/")[0]);
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;
+ }
}