Merge pull request #29869 from nextcloud/fix/28139/hide-status-from-public

Hide user status on profile from public
This commit is contained in:
Vincent Petry 2021-11-24 11:23:59 +01:00 committed by GitHub
commit 70f9e5e37d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -127,13 +127,15 @@ class ProfilePageController extends Controller {
}
}
$userStatuses = $this->userStatusManager->getUserStatuses([$targetUserId]);
$status = $userStatuses[$targetUserId] ?? null;
if ($status !== null) {
$this->initialStateService->provideInitialState('status', [
'icon' => $status->getIcon(),
'message' => $status->getMessage(),
]);
if ($visitingUser !== null) {
$userStatuses = $this->userStatusManager->getUserStatuses([$targetUserId]);
$status = $userStatuses[$targetUserId] ?? null;
if ($status !== null) {
$this->initialStateService->provideInitialState('status', [
'icon' => $status->getIcon(),
'message' => $status->getMessage(),
]);
}
}
$this->initialStateService->provideInitialState(