Mercurial > prosody-hg
comparison util/jid.lua @ 6891:7f76c77ddcb8
util.jid: Fix backout
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Fri, 02 Oct 2015 12:16:47 +0200 |
| parents | 7f7920f2aebf |
| children | 1859e07ae082 |
comparison
equal
deleted
inserted
replaced
| 6889:7f7920f2aebf | 6891:7f76c77ddcb8 |
|---|---|
| 34 if (not host) or ((not resource) and #jid >= hostpos) then return nil, nil, nil; end | 34 if (not host) or ((not resource) and #jid >= hostpos) then return nil, nil, nil; end |
| 35 return node, host, resource; | 35 return node, host, resource; |
| 36 end | 36 end |
| 37 | 37 |
| 38 local function bare(jid) | 38 local function bare(jid) |
| 39 local node, host = _split(jid); | 39 local node, host = split(jid); |
| 40 if node and host then | 40 if node and host then |
| 41 return node.."@"..host; | 41 return node.."@"..host; |
| 42 end | 42 end |
| 43 return host; | 43 return host; |
| 44 end | 44 end |
