diff options
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; |