Diff

core/moduleapi.lua @ 7950:f91e7ec9654e

Merge 0.10->trunk
author Kim Alvefur <zash@zash.se>
date Mon, 06 Mar 2017 01:14:32 +0100
parent 7647:e9d7a409e236
parent 7947:24170d74b00b
child 7982:e30b0cbed472
line wrap: on
line diff
--- a/core/moduleapi.lua	Fri Mar 03 11:52:22 2017 +0100
+++ b/core/moduleapi.lua	Mon Mar 06 01:14:32 2017 +0100
@@ -116,7 +116,8 @@
 		self:log("warn", "Error: Insufficient parameters to module:hook_stanza()");
 		return;
 	end
-	return self:hook("stanza/"..(xmlns and (xmlns..":") or "")..name, function (data) return handler(data.origin, data.stanza, data); end, priority);
+	return self:hook("stanza/"..(xmlns and (xmlns..":") or "")..name,
+		function (data) return handler(data.origin, data.stanza, data); end, priority);
 end
 api.hook_stanza = api.hook_tag; -- COMPAT w/pre-0.9
 
@@ -188,7 +189,8 @@
 		local path = paths[i];
 		if path:sub(1,1) ~= "/" then -- Prepend default components
 			local n_components = select(2, path:gsub("/", "%1"));
-			path = (n_components<#default_path_components and "/" or "")..t_concat(default_path_components, "/", 1, #default_path_components-n_components).."/"..path;
+			path = (n_components<#default_path_components and "/" or "")
+				..t_concat(default_path_components, "/", 1, #default_path_components-n_components).."/"..path;
 		end
 		local shared = shared_data[path];
 		if not shared then