Commit 1331baba authored by csh's avatar csh

OF-303 fix XEP-0013 support

git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/trunk@13948 b35dd754-fafc-0310-a699-88a17e54d16e
parent 3d5e78c4
......@@ -50,6 +50,7 @@ import org.xmpp.forms.DataForm;
import org.xmpp.forms.FormField;
import org.xmpp.packet.IQ;
import org.xmpp.packet.JID;
import org.xmpp.packet.PacketError;
/**
* Implements JEP-0013: Flexible Offline Message Retrieval. Allows users to request number of
......@@ -115,7 +116,12 @@ public class IQOfflineMessagesHandler extends IQHandler implements ServerFeature
}
else if ("remove".equals(item.attributeValue("action"))) {
// User requested to delete specific message
messageStore.deleteMessage(from.getNode(), creationDate);
if (messageStore.getMessage(from.getNode(), creationDate) != null) {
messageStore.deleteMessage(from.getNode(), creationDate);
} else {
// If the requester is authorized but the node does not exist, the server MUST return a <item-not-found/> error.
reply.setError(PacketError.Condition.item_not_found);
}
}
}
}
......
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