aboutsummaryrefslogtreecommitdiffstats
path: root/apps/user_status/lib/Controller/UserStatusController.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/user_status/lib/Controller/UserStatusController.php')
-rw-r--r--apps/user_status/lib/Controller/UserStatusController.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/user_status/lib/Controller/UserStatusController.php b/apps/user_status/lib/Controller/UserStatusController.php
index 3beb8abc3ab..053b07664a5 100644
--- a/apps/user_status/lib/Controller/UserStatusController.php
+++ b/apps/user_status/lib/Controller/UserStatusController.php
@@ -47,6 +47,7 @@ use OCP\IRequest;
use Psr\Log\LoggerInterface;
/**
+ * @psalm-import-type UserStatusType from ResponseDefinitions
* @psalm-import-type UserStatusPrivate from ResponseDefinitions
*/
class UserStatusController extends OCSController {
@@ -207,6 +208,8 @@ class UserStatusController extends OCSController {
* @return UserStatusPrivate
*/
private function formatStatus(UserStatus $status): array {
+ /** @var UserStatusType $visibleStatus */
+ $visibleStatus = $status->getStatus();
return [
'userId' => $status->getUserId(),
'message' => $status->getCustomMessage(),
@@ -214,7 +217,7 @@ class UserStatusController extends OCSController {
'messageIsPredefined' => $status->getMessageId() !== null,
'icon' => $status->getCustomIcon(),
'clearAt' => $status->getClearAt(),
- 'status' => $status->getStatus(),
+ 'status' => $visibleStatus,
'statusIsUserDefined' => $status->getIsUserDefined(),
];
}