diff options
author | sualko <klaus@jsxc.org> | 2017-10-20 15:35:03 +0300 |
---|---|---|
committer | sualko <klaus@jsxc.org> | 2017-10-20 15:35:03 +0300 |
commit | 64575bf3c266cbeb88a2371cd887c054075afc8a (patch) | |
tree | 9e0f456f30ba61cd1fc3a764832e9a885d06644a /build/lib/stanzahandlers/iq.php | |
parent | 534432e0ba766f4180260cdcc64614cf7ed0f6e2 (diff) |
build v3.3.1v3.3.1
Diffstat (limited to 'build/lib/stanzahandlers/iq.php')
-rw-r--r-- | build/lib/stanzahandlers/iq.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/build/lib/stanzahandlers/iq.php b/build/lib/stanzahandlers/iq.php index 9a7293c..9d36cc6 100644 --- a/build/lib/stanzahandlers/iq.php +++ b/build/lib/stanzahandlers/iq.php @@ -7,6 +7,7 @@ use OCP\IConfig; use OCP\IUserManager; use Sabre\Xml\Reader; use Sabre\Xml\Writer; +use OCA\OJSXC\AppInfo\Application; /** * Class IQ @@ -57,11 +58,12 @@ class IQ extends StanzaHandler $id = $stanza['attributes']['id']; $iqRoster = new IQRoster(); $iqRoster->setType('result'); - $iqRoster->setTo($this->from); + $iqRoster->setTo($this->userId); $iqRoster->setQid($id); foreach ($this->userManager->search('') as $user) { - if ($debugMode || (strtolower($user->getUID()) !== $this->userId)) { - $iqRoster->addItem($user->getUID() . '@' . $this->host, $user->getDisplayName()); + $userId = Application::santizeUserId($user->getUID()); + if ($debugMode || ($userId !== $this->userId && $user->isEnabled())) { + $iqRoster->addItem($userId . '@' . $this->host, $user->getDisplayName()); } } return $iqRoster; |