Merge pull request #23858 from nextcloud/backport/23842/stable20

[stable20] UserStatus: clear status message if message is null
This commit is contained in:
Morris Jobke 2020-11-03 20:41:11 +01:00 committed by GitHub
commit 28b4420797
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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);