Working presence, presence probes and other fixes
[prosody.git] / util / jid.lua
index 28dd1a926868b9ffc934522baf9a41cb4c2d8c4b..b1e4131d067c7d6ee353d76179e4527a095e4e80 100644 (file)
@@ -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