aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/generator
diff options
context:
space:
mode:
authoriNPUTmice <daniel@gultsch.de>2014-07-21 16:04:53 +0200
committeriNPUTmice <daniel@gultsch.de>2014-07-21 16:04:53 +0200
commitf9ed76f5e130f744e118ac752728949688a206a9 (patch)
tree25f25b1f82026cf51ab46d56d2af6bb79dd7f6e9 /src/eu/siacs/conversations/generator
parent87aff4c6d8ba516bf847b69bab25e5601a3bcd76 (diff)
switched to direct invites. fixes #284
Diffstat (limited to 'src/eu/siacs/conversations/generator')
-rw-r--r--src/eu/siacs/conversations/generator/MessageGenerator.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/eu/siacs/conversations/generator/MessageGenerator.java b/src/eu/siacs/conversations/generator/MessageGenerator.java
index 5a216a7e..3195c953 100644
--- a/src/eu/siacs/conversations/generator/MessageGenerator.java
+++ b/src/eu/siacs/conversations/generator/MessageGenerator.java
@@ -128,4 +128,14 @@ public class MessageGenerator {
packet.setFrom(conversation.getAccount().getJid());
return packet;
}
+
+ public MessagePacket invite(Conversation conversation, String contact) {
+ MessagePacket packet = new MessagePacket();
+ packet.setType(MessagePacket.TYPE_NORMAL);
+ packet.setTo(contact);
+ packet.setFrom(conversation.getAccount().getFullJid());
+ Element x = packet.addChild("x", "jabber:x:conference");
+ x.setAttribute("jid", conversation.getContactJid().split("/")[0]);
+ return packet;
+ }
}