Mercurial > prosody-hg
diff util/jid.lua @ 6340:7e820979fd9b
util.jid: Optimize bare
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Thu, 07 Aug 2014 17:43:28 +0200 |
| parents | 1c19464cde77 |
| children | 5de6b93d0190 |
line wrap: on
line diff
--- a/util/jid.lua Thu Aug 07 17:35:11 2014 +0200 +++ b/util/jid.lua Thu Aug 07 17:43:28 2014 +0200 @@ -37,11 +37,7 @@ 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)
