aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/generator/MessageGenerator.java
diff options
context:
space:
mode:
authoriNPUTmice <daniel@gultsch.de>2014-07-24 01:04:25 +0200
committeriNPUTmice <daniel@gultsch.de>2014-07-24 01:04:25 +0200
commit7ee2ef5233b832fd419455ab78a26dff33a5da21 (patch)
tree63f4b8de4dcbb95b7b2bf3dc4af4899239127d74 /src/eu/siacs/conversations/generator/MessageGenerator.java
parent23e5fb5d5643ef915fda4819d3786e245cfcea88 (diff)
answer correctly if both markers and receipts are requested
Diffstat (limited to 'src/eu/siacs/conversations/generator/MessageGenerator.java')
-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 4885177c..4449a7ec 100644
--- a/src/eu/siacs/conversations/generator/MessageGenerator.java
+++ b/src/eu/siacs/conversations/generator/MessageGenerator.java
@@ -151,4 +151,14 @@ public class MessageGenerator {
packet.addChild(x);
return packet;
}
+
+ public MessagePacket received(Account account, MessagePacket originalMessage, String namespace) {
+ MessagePacket receivedPacket = new MessagePacket();
+ receivedPacket.setType(MessagePacket.TYPE_NORMAL);
+ receivedPacket.setTo(originalMessage.getFrom());
+ receivedPacket.setFrom(account.getFullJid());
+ Element received = receivedPacket.addChild("received",namespace);
+ received.setAttribute("id", originalMessage.getId());
+ return receivedPacket;
+ }
}