Providing some human readable error messages and some fixes.
[prosody.git] / plugins / mod_legacyauth.lua
index 7a205e5bb64926ac724c8c1ed68921abce71fa24..ed698bf2450de3263c4d77f05b0133a8d7e23f74 100644 (file)
@@ -38,7 +38,7 @@ add_iq_handler("c2s_unauthed", "jabber:iq:auth",
                                                                reply:tag("error", { code = "401", type = "auth" })
                                                                        :tag("not-authorized", { xmlns = "urn:ietf:params:xml:ns:xmpp-stanzas" });
                                                        end
-                                                       dispatch_stanza(reply);
+                                                       send(session, reply);
                                                        return true;
                                                end
                                        end
@@ -49,7 +49,7 @@ add_iq_handler("c2s_unauthed", "jabber:iq:auth",
                                        reply.attr.type = "error";
                                        reply:tag("error", { code = "401", type = "auth" })
                                                :tag("not-authorized", { xmlns = "urn:ietf:params:xml:ns:xmpp-stanzas" });
-                                       dispatch_stanza(reply);
+                                       send(session, reply);
                                        return true;
                                end
                        end