aboutsummaryrefslogtreecommitdiffstats
path: root/util/jid.lua
diff options
context:
space:
mode:
Diffstat (limited to 'util/jid.lua')
-rw-r--r--util/jid.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/util/jid.lua b/util/jid.lua
index 28dd1a92..b1e4131d 100644
--- a/util/jid.lua
+++ b/util/jid.lua
@@ -4,9 +4,12 @@ local match = string.match;
module "jid"
function split(jid)
- if not jid then return nil; end
+ if not jid then return; end
+ -- TODO verify JID, and return; if invalid
local node = match(jid, "^([^@]+)@");
local server = (node and match(jid, ".-@([^@/]+)")) or match(jid, "^([^@/]+)");
local resource = match(jid, "/(.+)$");
return node, server, resource;
end
+
+return _M; \ No newline at end of file