aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2014-08-07 17:43:28 +0200
committerKim Alvefur <zash@zash.se>2014-08-07 17:43:28 +0200
commit9875580ca905a10e26448509a1f46f4a270a8e61 (patch)
tree0e4929eaabc8f43733e883f5d558eaf6798635ec /util
parentd68e3b56200c4c208e38d75b3396ae8c9de27423 (diff)
downloadprosody-9875580ca905a10e26448509a1f46f4a270a8e61.tar.gz
prosody-9875580ca905a10e26448509a1f46f4a270a8e61.zip
util.jid: Optimize bare
Diffstat (limited to 'util')
-rw-r--r--util/jid.lua6
1 files changed, 1 insertions, 5 deletions
diff --git a/util/jid.lua b/util/jid.lua
index 14d8f2b4..27afab3e 100644
--- a/util/jid.lua
+++ b/util/jid.lua
@@ -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)