diff -r 3b75943fa5c1 -r 6e3aa3995eab util/jid.lua --- a/util/jid.lua Tue Oct 11 13:31:47 2022 +0100 +++ b/util/jid.lua Tue Oct 11 13:33:19 2022 +0100 @@ -35,8 +35,7 @@ if jid == nil then return; end local node, nodepos = match(jid, "^([^@/]+)@()"); local host, hostpos = match(jid, "^([^@/]+)()", nodepos); - if node ~= nil and host == nil then return nil, nil, nil; end - local resource = match(jid, "^/(.+)$", hostpos); + local resource = host and match(jid, "^/(.+)$", hostpos); if (host == nil) or ((resource == nil) and #jid >= hostpos) then return nil, nil, nil; end return node, host, resource; end