Software /
code /
prosody-modules
Diff
mod_rest/mod_rest.lua @ 3814:0dede5b0ab27
mod_rest: Fix return status when sending and forgetting
Turns out module:send() doesn't return anything, so there's no way to
know if it was routed successfully.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 01 Jan 2020 16:35:55 +0100 |
parent | 3813:aa1ad69c7c10 |
child | 3815:1a0a612d36bc |
line wrap: on
line diff
--- a/mod_rest/mod_rest.lua Wed Jan 01 16:21:28 2020 +0100 +++ b/mod_rest/mod_rest.lua Wed Jan 01 16:35:55 2020 +0100 @@ -133,11 +133,8 @@ response:send(encode(send_type, stanza)); return true; end - if module:send(payload, origin) then - return 202; - else - return 500; - end + module:send(payload, origin); + return 202; end end