Diff

component.lua @ 411:db462d4feb44

verse: trim trailing whitespace
author Kim Alvefur <zash@zash.se>
date Tue, 18 Apr 2017 16:46:26 +0200
parent 410:6171ef2a4025
child 485:c9a144591649
line wrap: on
line diff
--- a/component.lua	Fri Apr 07 19:39:59 2017 +0200
+++ b/component.lua	Tue Apr 18 16:46:26 2017 +0200
@@ -19,7 +19,7 @@
 	stream_ns = xmlns_stream,
 	stream_tag = "stream",
 	 default_ns = xmlns_component };
-	
+
 function stream_callbacks.streamopened(stream, attr)
 	stream.stream_id = attr.id;
 	if not stream:event("opened", attr) then
@@ -55,18 +55,18 @@
 function stream:connect_component(jid, pass)
 	self.jid, self.password = jid, pass;
 	self.username, self.host, self.resource = jid_split(jid);
-	
+
 	function self.data(conn, data)
 		local ok, err = self.stream:feed(data);
 		if ok then return; end
 		stream:debug("Received invalid XML (%s) %d bytes: %s", tostring(err), #data, data:sub(1, 300):gsub("[\r\n]+", " "));
 		stream:close("xml-not-well-formed");
 	end
-	
+
 	self:hook("incoming-raw", function (data) return self.data(self.conn, data); end);
-	
+
 	self.curr_id = 0;
-	
+
 	self.tracked_iqs = {};
 	self:hook("stanza", function (stanza)
 		local id, type = stanza.attr.id, stanza.attr.type;
@@ -76,7 +76,7 @@
 			return true;
 		end
 	end);
-	
+
 	self:hook("stanza", function (stanza)
 		local ret;
 		if stanza.attr.xmlns == nil or stanza.attr.xmlns == "jabber:client" then