From 2042436850916ff3a29bc2beaa515298eb5e0239 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Thu, 7 Aug 2014 17:43:28 +0200 Subject: util.jid: Optimize bare --- util/jid.lua | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'util/jid.lua') 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) -- cgit v1.2.3