aboutsummaryrefslogtreecommitdiffstats
path: root/storage-backend/lib
diff options
context:
space:
mode:
Diffstat (limited to 'storage-backend/lib')
-rw-r--r--storage-backend/lib/xmpp.util.inc.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/storage-backend/lib/xmpp.util.inc.php b/storage-backend/lib/xmpp.util.inc.php
index cdc90fb..eaf65fd 100644
--- a/storage-backend/lib/xmpp.util.inc.php
+++ b/storage-backend/lib/xmpp.util.inc.php
@@ -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);
}