plugins.sasl: Collect text message on SASL failure

Mon, 28 May 2012 17:32:38 +0200

author
Kim Alvefur <zash@zash.se>
date
Mon, 28 May 2012 17:32:38 +0200
changeset 302
0c83cb476246
parent 301
ffa55bc9396f
child 303
0dda04d5eb84

plugins.sasl: Collect text message on SASL failure

plugins/sasl.lua file | annotate | diff | comparison | revisions
--- a/plugins/sasl.lua	Fri May 18 22:11:23 2012 +0200
+++ b/plugins/sasl.lua	Mon May 28 17:32:38 2012 +0200
@@ -24,7 +24,8 @@
 			stream:event("authentication-success");
 		elseif sasl_stanza.name == "failure" then
 			local err = sasl_stanza.tags[1];
-			stream:event("authentication-failure", { condition = err.name });
+			local text = sasl_stanza:get_child_text("text");
+			stream:event("authentication-failure", { condition = err.name, text = text });
 		end
 		stream:reopen();
 		return true;

mercurial