aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger/generator
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2017-11-22 21:58:38 +0100
committerChristian Schneppe <christian@pix-art.de>2017-11-22 21:58:38 +0100
commitf5a5fb2bd391877ff438e3a3b773df7eb822f02e (patch)
tree058a8d3fca8b2fbf57601b97b5333c8b1caa7324 /src/main/java/de/pixart/messenger/generator
parent38756a4b393085827cdfb514f6d2429a5aeb87a2 (diff)
save full jid when sending in muc. check chat markers against 'sender'
Diffstat (limited to 'src/main/java/de/pixart/messenger/generator')
-rw-r--r--src/main/java/de/pixart/messenger/generator/MessageGenerator.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/main/java/de/pixart/messenger/generator/MessageGenerator.java b/src/main/java/de/pixart/messenger/generator/MessageGenerator.java
index 4dae14757..acdaedcbe 100644
--- a/src/main/java/de/pixart/messenger/generator/MessageGenerator.java
+++ b/src/main/java/de/pixart/messenger/generator/MessageGenerator.java
@@ -170,13 +170,16 @@ public class MessageGenerator extends AbstractGenerator {
return packet;
}
- public MessagePacket confirm(final Account account, final Jid to, final String id, final boolean groupChat) {
+ public MessagePacket confirm(final Account account, final Jid to, final String id, final Jid counterpart, final boolean groupChat) {
MessagePacket packet = new MessagePacket();
packet.setType(groupChat ? MessagePacket.TYPE_GROUPCHAT : MessagePacket.TYPE_CHAT);
packet.setTo(groupChat ? to.toBareJid() : to);
packet.setFrom(account.getJid());
- Element received = packet.addChild("displayed", "urn:xmpp:chat-markers:0");
- received.setAttribute("id", id);
+ Element displayed = packet.addChild("displayed", "urn:xmpp:chat-markers:0");
+ displayed.setAttribute("id", id);
+ if (groupChat && counterpart != null) {
+ displayed.setAttribute("sender", counterpart.toPreppedString());
+ }
packet.addChild("store", "urn:xmpp:hints");
return packet;
}