util.jid: Optimize bare

This commit is contained in:
Kim Alvefur 2014-08-07 17:43:28 +02:00
parent 2fc4e2dd51
commit 2042436850

View file

@ -37,11 +37,7 @@ end
split = _split;
function bare(jid)
local node, host = _split(jid);
if node and host then
return node.."@"..host;
end
return host;
return jid and match(jid, "^[^/]+");
end
local function _prepped_split(jid)