mod_rest: Fix routing to self-jid (thanks jonas’)
authorKim Alvefur <zash@zash.se>
Sat, 29 Feb 2020 13:26:05 +0100
changeset 3930 f77ae9685eb6
parent 3929 7dec5d096bb8
child 3931 4c1f80076606
mod_rest: Fix routing to self-jid (thanks jonas’)
mod_rest/mod_rest.lua
--- a/mod_rest/mod_rest.lua	Fri Feb 28 22:40:53 2020 +0100
+++ b/mod_rest/mod_rest.lua	Sat Feb 29 13:26:05 2020 +0100
@@ -161,7 +161,7 @@
 	local send_type = decide_type((request.headers.accept or "") ..",".. request.headers.content_type)
 	if payload.name == "iq" then
 		function origin.send(stanza)
-			prosody.core_route_stanza(nil, stanza);
+			module:send(stanza);
 		end
 		if payload.attr.type ~= "get" and payload.attr.type ~= "set" then
 			return errors.new({ code = 422, text = "'iq' stanza must be of type 'get' or 'set'" });