X-Git-Url: https://git.enpas.org/?a=blobdiff_plain;f=plugins%2Fmod_legacyauth.lua;h=5fb664415682661f6fb30fac87152e72b703b3fc;hb=d631eea82c5144b9c2142b32affdb0ba4f878a43;hp=dcb652a0e0893822e174a78fe1b2f5608a972cad;hpb=17334d062096e43a3c1f8c2ec5f82b0f97f7b7c4;p=prosody.git diff --git a/plugins/mod_legacyauth.lua b/plugins/mod_legacyauth.lua index dcb652a0..5fb66441 100644 --- a/plugins/mod_legacyauth.lua +++ b/plugins/mod_legacyauth.lua @@ -35,7 +35,7 @@ module:hook("stanza/iq/jabber:iq:auth:query", function(event) local session, stanza = event.origin, event.stanza; if session.type ~= "c2s_unauthed" then - session.send(st.error_reply(stanza, "cancel", "service-unavailable", "Legacy authentication is only allowed for unauthenticated client connections.")); + (session.sends2s or session.send)(st.error_reply(stanza, "cancel", "service-unavailable", "Legacy authentication is only allowed for unauthenticated client connections.")); return true; end