aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2019-05-05 07:16:05 +0200
committerKim Alvefur <zash@zash.se>2019-05-05 07:16:05 +0200
commitffd7ca3f8daaa3d0137012759f7cfe52a835ea89 (patch)
tree595aa6b46402fa7b22b3939d4be7863c709f0b96 /plugins
parent7e32666c2b78f5bebe46bcf336f66a3e7d2eff36 (diff)
downloadprosody-ffd7ca3f8daaa3d0137012759f7cfe52a835ea89.tar.gz
prosody-ffd7ca3f8daaa3d0137012759f7cfe52a835ea89.zip
mod_mam: Propagate item-not-found to client (fixes #1325)
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_mam/mod_mam.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/mod_mam/mod_mam.lua b/plugins/mod_mam/mod_mam.lua
index 632de9ea..317ddac1 100644
--- a/plugins/mod_mam/mod_mam.lua
+++ b/plugins/mod_mam/mod_mam.lua
@@ -142,7 +142,11 @@ module:hook("iq-set/self/"..xmlns_mam..":query", function(event)
});
if not data then
- origin.send(st.error_reply(stanza, "cancel", "internal-server-error", err));
+ 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);