aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs/conversations/generator
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/eu/siacs/conversations/generator')
-rw-r--r--src/main/java/eu/siacs/conversations/generator/AbstractGenerator.java1
-rw-r--r--src/main/java/eu/siacs/conversations/generator/MessageGenerator.java3
2 files changed, 4 insertions, 0 deletions
diff --git a/src/main/java/eu/siacs/conversations/generator/AbstractGenerator.java b/src/main/java/eu/siacs/conversations/generator/AbstractGenerator.java
index d5059605..d223ab84 100644
--- a/src/main/java/eu/siacs/conversations/generator/AbstractGenerator.java
+++ b/src/main/java/eu/siacs/conversations/generator/AbstractGenerator.java
@@ -31,6 +31,7 @@ public abstract class AbstractGenerator {
"urn:xmpp:avatar:metadata+notify",
"http://jabber.org/protocol/nick+notify",
"urn:xmpp:ping",
+ "urn:xmpp:message-correct:0",
"jabber:iq:version",
"http://jabber.org/protocol/chatstates",
AxolotlService.PEP_DEVICE_LIST+"+notify"};
diff --git a/src/main/java/eu/siacs/conversations/generator/MessageGenerator.java b/src/main/java/eu/siacs/conversations/generator/MessageGenerator.java
index b849f56f..0e7a8ce6 100644
--- a/src/main/java/eu/siacs/conversations/generator/MessageGenerator.java
+++ b/src/main/java/eu/siacs/conversations/generator/MessageGenerator.java
@@ -47,6 +47,9 @@ public class MessageGenerator extends AbstractGenerator {
}
packet.setFrom(account.getJid());
packet.setId(message.getUuid());
+ if (message.edited()) {
+ packet.addChild("replace","urn:xmpp:message-correct:0").setAttribute("id",message.getEditedId());
+ }
return packet;
}