Commit 1b5d8465 authored by Guus der Kinderen's avatar Guus der Kinderen

OF-1498: Monitoring plugin: Fix stanza reconstruction

parent 8c0da0f4
......@@ -49,6 +49,7 @@ Monitoring Plugin Changelog
<li>[<a href='https://issues.igniterealtime.org/browse/OF-1486'>OF-1486</a>] - MAM RSM queries for MUC should allow for 'backwards-paging'.</li>
<li>[<a href='https://issues.igniterealtime.org/browse/OF-1487'>OF-1487</a>] - Archived messages should become available in the database instantly.</li>
<li>[<a href='https://issues.igniterealtime.org/browse/OF-1200'>OF-1200</a>] - Don't answer MAM queries before relevant archives have been stored.</li>
<li>[<a href='https://issues.igniterealtime.org/browse/OF-1498'>OF-1498</a>] - Fix for stanza reconstruction bug.</li>
</ul>
<p><b>1.5.9</b> -- Feb 13, 2018</p>
......
......@@ -339,7 +339,7 @@ abstract class IQQueryHandler extends AbstractIQHandler implements
if(stanzaText == null || stanzaText.equals("")) {
// Try creating a fake one from the body.
if (archivedMessage.getBody() != null && !archivedMessage.getBody().equals("")) {
stanzaText = String.format("<message from=\"{}\" to=\"{}\" type=\"chat\"><body>{}</body>", archivedMessage.getWithJid(), archivedMessage.getWithJid(), archivedMessage.getBody());
stanzaText = String.format("<message from=\"%s\" to=\"%s\" type=\"chat\"><body>%s</body>", archivedMessage.getWithJid(), archivedMessage.getWithJid(), archivedMessage.getBody());
} else {
// Don't send legacy archived messages (that have no stanza)
return;
......
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