aboutsummaryrefslogtreecommitdiffstats
path: root/util/jid.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2015-10-02 12:13:32 +0200
committerKim Alvefur <zash@zash.se>2015-10-02 12:13:32 +0200
commit6867b873ba4863cbcefc937611a1e1233caac550 (patch)
treefdbe2b55e4c4f871de4fc6cb9aa004e0da258221 /util/jid.lua
parent0e4e770687183e78e70ea16d056c039062b3708f (diff)
parent387a36c6fa8e8810ffb75d6ce850ff569040a9f4 (diff)
downloadprosody-6867b873ba4863cbcefc937611a1e1233caac550.tar.gz
prosody-6867b873ba4863cbcefc937611a1e1233caac550.zip
Merge 0.10->trunk
Diffstat (limited to 'util/jid.lua')
-rw-r--r--util/jid.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/util/jid.lua b/util/jid.lua
index 696f51d8..4dd7b04d 100644
--- a/util/jid.lua
+++ b/util/jid.lua
@@ -36,7 +36,11 @@ local function split(jid)
end
local function bare(jid)
- return jid and match(jid, "^[^/]+");
+ local node, host = _split(jid);
+ if node and host then
+ return node.."@"..host;
+ end
+ return host;
end
local function prepped_split(jid)