aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2019-05-05 07:16:03 +0200
committerKim Alvefur <zash@zash.se>2019-05-05 07:16:03 +0200
commitd88db76a0669d3613fc6ce1123943e9bd8927395 (patch)
treea0221a12491de88982dfbdc47aeacba886c16279 /plugins
parentfcda870911ff3a9ae66a3051c0e1a281f7b99772 (diff)
downloadprosody-d88db76a0669d3613fc6ce1123943e9bd8927395.tar.gz
prosody-d88db76a0669d3613fc6ce1123943e9bd8927395.zip
mod_muc_mam: Propagate item-not-found to client (fixes #1325)
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_muc_mam.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/mod_muc_mam.lua b/plugins/mod_muc_mam.lua
index fffe23e7..bba7f422 100644
--- a/plugins/mod_muc_mam.lua
+++ b/plugins/mod_muc_mam.lua
@@ -189,7 +189,11 @@ module:hook("iq-set/bare/"..xmlns_mam..":query", function(event)
});
if not data then
- origin.send(st.error_reply(stanza, "cancel", "internal-server-error"));
+ if err == "item-not-found" then
+ origin.send(st.error_reply(stanza, "modify", "item-not-found"));
+ else
+ origin.send(st.error_reply(stanza, "cancel", "internal-server-error"));
+ end
return true;
end
local total = tonumber(err);