fixes error in getJidDomain(JID) in case of a JID with resource identifier
This commit is contained in:
parent
35ad320c69
commit
840bd494f9
1 changed files with 1 additions and 1 deletions
|
@ -13,7 +13,7 @@ function getJidDomain($jid) {
|
|||
|
||||
if ($slashIndex !== false) {
|
||||
if ($slashIndex > $atIndex) {// 'local@domain.foo/resource' and 'local@domain.foo/res@otherres' case
|
||||
return substr($jid, $atIndex + 1, $slashIndex - $atIndex + 1);
|
||||
return substr($jid, $atIndex + 1, $slashIndex - $atIndex - 1);
|
||||
} else {// 'domain.foo/res@otherres' case
|
||||
return substr($jid, 0, $slashIndex);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue