UserStatus: no message means clear status message. This fixes #23332

Signed-off-by: Simon Spannagel <simonspa@kth.se>
This commit is contained in:
Simon Spannagel 2020-11-02 17:58:23 +01:00 committed by backportbot[bot]
parent a81b901c71
commit 9750efe5ab
1 changed files with 2 additions and 2 deletions

View File

@ -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);