aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2015-10-02 12:12:24 +0200
committerKim Alvefur <zash@zash.se>2015-10-02 12:12:24 +0200
commit387a36c6fa8e8810ffb75d6ce850ff569040a9f4 (patch)
treeac97d373605b3a5630d25791848a39dd7608d071
parentb9c17069eac26443575ceee3674a12cb41df4f52 (diff)
downloadprosody-387a36c6fa8e8810ffb75d6ce850ff569040a9f4.tar.gz
prosody-387a36c6fa8e8810ffb75d6ce850ff569040a9f4.zip
Backout 7e820979fd9b (broke tests)
-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)