plugins.adhoc, plugins.jingle: Fix checking of type attribute (thanks Mark)

Fri, 07 Jun 2013 14:36:41 +0100

author
Matthew Wild <mwild1@gmail.com>
date
Fri, 07 Jun 2013 14:36:41 +0100
changeset 341
a95890d86fe4
parent 340
0ce227f6034c
child 342
7aed4bc4949c

plugins.adhoc, plugins.jingle: Fix checking of type attribute (thanks Mark)

plugins/adhoc.lua file | annotate | diff | comparison | revisions
plugins/jingle.lua file | annotate | diff | comparison | revisions
--- a/plugins/adhoc.lua	Tue May 28 15:14:50 2013 +0100
+++ b/plugins/adhoc.lua	Fri Jun 07 14:36:41 2013 +0100
@@ -77,7 +77,7 @@
 end
 
 function command_mt:_process_response(result)
-	if result.type == "error" then
+	if result.attr.type == "error" then
 		self.status = "canceled";
 		self.callback(self, {});
 		return;
--- a/plugins/jingle.lua	Tue May 28 15:14:50 2013 +0100
+++ b/plugins/jingle.lua	Fri Jun 07 14:36:41 2013 +0100
@@ -237,7 +237,7 @@
 	end);
 	
 	self.stream:send_iq(session_initiate, function (result)
-		if result.type == "error" then
+		if result.attr.type == "error" then
 			self.state = "terminated";
 			local type, condition, text = result:get_error();
 			return self:event("error", { type = type, condition = condition, text = text });

mercurial