diff options
author | Kim Alvefur <zash@zash.se> | 2017-03-06 01:14:32 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2017-03-06 01:14:32 +0100 |
commit | 0e71fac1d18b0de0e9203cb6b71c971d55c8c70c (patch) | |
tree | e58db2bf464bf09301a9c02c27330c2dba6b926d /core/moduleapi.lua | |
parent | 2ca03f1a40ea0854e0dda798b82e31c558eed578 (diff) | |
parent | 91d2b2518f3e3d047dc43f59db3f7025d29ab86c (diff) | |
download | prosody-0e71fac1d18b0de0e9203cb6b71c971d55c8c70c.tar.gz prosody-0e71fac1d18b0de0e9203cb6b71c971d55c8c70c.zip |
Merge 0.10->trunk
Diffstat (limited to 'core/moduleapi.lua')
-rw-r--r-- | core/moduleapi.lua | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/core/moduleapi.lua b/core/moduleapi.lua index d89d46fa..62c34031 100644 --- a/core/moduleapi.lua +++ b/core/moduleapi.lua @@ -116,7 +116,8 @@ function api:hook_tag(xmlns, name, handler, priority) 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 @@ function api:shared(...) 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 |