From d208ade2a7afd0b03932cc24103486076ab20a42 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Fri, 2 Oct 2015 12:12:24 +0200 Subject: Backout 7e820979fd9b (broke tests) --- util/jid.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'util/jid.lua') 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) -- cgit v1.2.3