Merge pull request #23858 from nextcloud/backport/23842/stable20
[stable20] UserStatus: clear status message if message is null
This commit is contained in:
commit
28b4420797
|
@ -135,10 +135,10 @@ class UserStatusController extends OCSController {
|
||||||
* @throws OCSBadRequestException
|
* @throws OCSBadRequestException
|
||||||
*/
|
*/
|
||||||
public function setCustomMessage(?string $statusIcon,
|
public function setCustomMessage(?string $statusIcon,
|
||||||
string $message,
|
?string $message,
|
||||||
?int $clearAt): DataResponse {
|
?int $clearAt): DataResponse {
|
||||||
try {
|
try {
|
||||||
if ($message !== '') {
|
if ($message !== null && $message !== '') {
|
||||||
$status = $this->service->setCustomMessage($this->userId, $statusIcon, $message, $clearAt);
|
$status = $this->service->setCustomMessage($this->userId, $statusIcon, $message, $clearAt);
|
||||||
} else {
|
} else {
|
||||||
$this->service->clearMessage($this->userId);
|
$this->service->clearMessage($this->userId);
|
||||||
|
|
Loading…
Reference in New Issue