Skip to content

Commit

Permalink
No statuses for guests
Browse files Browse the repository at this point in the history
Ref nextcloud-libraries/nextcloud-vue#1379

Signed-off-by: Joas Schilling <coding@schilljs.com>
  • Loading branch information
nickvergessen committed Sep 3, 2020
1 parent 8978b51 commit 3668522
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/Controller/ChatController.php
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ public function mentions(string $search, int $limit = 20, bool $includeStatus =
]);

$statuses = [];
if ($includeStatus) {
if ($this->userId !== null && $includeStatus) {
$userIds = array_filter(array_map(static function (array $userResult) {
return $userResult['value']['shareWith'];
}, $results['users']));
Expand Down
2 changes: 1 addition & 1 deletion lib/Controller/RoomController.php
Original file line number Diff line number Diff line change
Expand Up @@ -842,7 +842,7 @@ public function getParticipants(bool $includeStatus = false): DataResponse {
$results = [];

$statuses = [];
if ($includeStatus && count($participants['users']) < 100) {
if ($this->userId !== null && $includeStatus && count($participants['users']) < 100) {
$userIds = array_map('strval', array_keys($participants['users']));
$statuses = $this->statusManager->getUserStatuses($userIds);
}
Expand Down

0 comments on commit 3668522

Please sign in to comment.