exit module after sending error reply in case storage backend returned error code 403

This commit is contained in:
steckbrief 2016-08-22 16:59:40 +02:00
parent 59fe125714
commit 1b4c02e5ca

View file

@ -107,6 +107,7 @@ module:hook("iq/host/"..xmlns_http_upload..":request", function (event)
end
elseif statuscode == 403 and errobj["msg"] ~= nil then
origin.send(st.error_reply(stanza, "cancel", "internal-server-error", errobj.msg));
return true;
else
origin.send(st.error_reply(stanza, "cancel", "undefined-condition", "msg or err_code not found"));
return true;
@ -172,6 +173,7 @@ module:hook("iq/host/"..xmlns_http_upload..":request", function (event)
end
elseif statuscode == 403 and errobj["msg"] ~= nil then
origin.send(st.error_reply(stanza, "cancel", "internal-server-error", errobj.msg));
return true;
else
origin.send(st.error_reply(stanza, "cancel", "undefined-condition", "msg or err_code not found"));
return true;