From 9750efe5ab6c9170d1108ae3bc7c0599e1197868 Mon Sep 17 00:00:00 2001 From: Simon Spannagel Date: Mon, 2 Nov 2020 17:58:23 +0100 Subject: [PATCH] UserStatus: no message means clear status message. This fixes #23332 Signed-off-by: Simon Spannagel --- apps/user_status/lib/Controller/UserStatusController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/user_status/lib/Controller/UserStatusController.php b/apps/user_status/lib/Controller/UserStatusController.php index 950cafb104..0ca82e84cb 100644 --- a/apps/user_status/lib/Controller/UserStatusController.php +++ b/apps/user_status/lib/Controller/UserStatusController.php @@ -135,10 +135,10 @@ class UserStatusController extends OCSController { * @throws OCSBadRequestException */ public function setCustomMessage(?string $statusIcon, - string $message, + ?string $message, ?int $clearAt): DataResponse { try { - if ($message !== '') { + if ($message !== null && $message !== '') { $status = $this->service->setCustomMessage($this->userId, $statusIcon, $message, $clearAt); } else { $this->service->clearMessage($this->userId);