Commit 8d2f0722 authored by Guus der Kinderen's avatar Guus der Kinderen

Merge pull request #492 from sco0ter/smDelay

Don't add multiple delayed delivery extension to resent messages.
parents 5b11857d 81363d82
......@@ -178,10 +178,12 @@ public class StreamManager {
for (StreamManager.UnackedPacket unacked : unacknowledgedStanzas) {
if (unacked.packet instanceof Message) {
Message m = (Message) unacked.packet;
if (m.getExtension("delay", "urn:xmpp:delay") == null) {
Element delayInformation = m.addChildElement("delay", "urn:xmpp:delay");
delayInformation.addAttribute("stamp", XMPPDateTimeFormat.format(unacked.timestamp));
delayInformation.addAttribute("from", serverAddress.toBareJID());
}
}
router.route(unacked.packet);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment