Skip to content

Commit

Permalink
Merge pull request #42532 from nextcloud/fix/user_status/custom-messa…
Browse files Browse the repository at this point in the history
…ge-icon-only
  • Loading branch information
provokateurin committed Jan 10, 2024
2 parents 379d323 + b8fecdb commit ee710d1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion apps/user_status/lib/Controller/UserStatusController.php
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ public function setCustomMessage(?string $statusIcon,
?string $message,
?int $clearAt): DataResponse {
try {
if (($message !== null && $message !== '') || ($clearAt !== null && $clearAt !== 0)) {
if (($statusIcon !== null && $statusIcon !== '') || ($message !== null && $message !== '') || ($clearAt !== null && $clearAt !== 0)) {
$status = $this->service->setCustomMessage($this->userId, $statusIcon, $message, $clearAt);
} else {
$this->service->clearMessage($this->userId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ public function setCustomMessageDataProvider(): array {
return [
['👨🏽‍💻', 'Busy developing the status feature', 500, true, false, null, false, null],
['👨🏽‍💻', '', 500, true, false, null, false, null, false],
['👨🏽‍💻', '', 0, true, false, null, false, null, true],
['👨🏽‍💻', '', 0, true, false, null, false, null, false],
['👨🏽‍💻', 'Busy developing the status feature', 500, false, true, new InvalidClearAtException('Original exception message'), true,
'New user-status for "john.doe" was rejected due to an invalid clearAt value "500"'],
['👨🏽‍💻', 'Busy developing the status feature', 500, false, true, new InvalidStatusIconException('Original exception message'), true,
Expand Down

0 comments on commit ee710d1

Please sign in to comment.