diff options
author | louiz’ <louiz@louiz.org> | 2018-02-11 23:29:58 +0100 |
---|---|---|
committer | louiz’ <louiz@louiz.org> | 2018-02-11 23:29:58 +0100 |
commit | d70554143554f1a4ed3d225d30a6e49227f40fc1 (patch) | |
tree | 2410b3b7c031920943c9293faacdeec3b74ba455 /src/xmpp | |
parent | 0280343ced6c520700c3ca508e2d04c6b512d319 (diff) | |
download | biboumi-d70554143554f1a4ed3d225d30a6e49227f40fc1.tar.gz biboumi-d70554143554f1a4ed3d225d30a6e49227f40fc1.tar.bz2 biboumi-d70554143554f1a4ed3d225d30a6e49227f40fc1.tar.xz biboumi-d70554143554f1a4ed3d225d30a6e49227f40fc1.zip |
Send a item-not-found error when the “after” value is not in the archive
Diffstat (limited to 'src/xmpp')
-rw-r--r-- | src/xmpp/biboumi_component.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/xmpp/biboumi_component.cpp b/src/xmpp/biboumi_component.cpp index cd6d570..405ac15 100644 --- a/src/xmpp/biboumi_component.cpp +++ b/src/xmpp/biboumi_component.cpp @@ -467,8 +467,12 @@ void BiboumiComponent::handle_iq(const Stanza& stanza) #ifdef USE_DATABASE else if ((query = stanza.get_child("query", MAM_NS))) { - if (this->handle_mam_request(stanza)) - stanza_error.disable(); + try { + if (this->handle_mam_request(stanza)) + stanza_error.disable(); + } catch (const Database::RecordNotFound& exc) { + error_name = "item-not-found"; + } } else if ((query = stanza.get_child("query", MUC_OWNER_NS))) { |