Diff

util/jid.lua @ 6889:7f7920f2aebf

Backout 7e820979fd9b (broke tests)
author Kim Alvefur <zash@zash.se>
date Fri, 02 Oct 2015 12:12:24 +0200
parent 6777:5de6b93d0190
child 6891:7f76c77ddcb8
line wrap: on
line diff
--- a/util/jid.lua	Sun Sep 27 00:36:34 2015 +0200
+++ b/util/jid.lua	Fri Oct 02 12:12:24 2015 +0200
@@ -36,7 +36,11 @@
 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)