aboutsummaryrefslogtreecommitdiffstats
path: root/apps/user_status
diff options
context:
space:
mode:
authorKate <26026535+provokateurin@users.noreply.github.com>2024-01-10 09:11:26 +0100
committerGitHub <noreply@github.com>2024-01-10 09:11:26 +0100
commitee710d1010a0124167671d25059c67403aa1a4f9 (patch)
tree6a07f0df8ccb17a93d7abc22bca515db2f553b29 /apps/user_status
parent379d323801ed357bd64147a9a53f65683996d012 (diff)
parentb8fecdb470ba5bc19946d5a751aa4925695e01cf (diff)
downloadnextcloud-server-ee710d1010a0124167671d25059c67403aa1a4f9.tar.gz
nextcloud-server-ee710d1010a0124167671d25059c67403aa1a4f9.zip
Merge pull request #42532 from nextcloud/fix/user_status/custom-message-icon-only
Diffstat (limited to 'apps/user_status')
-rw-r--r--apps/user_status/lib/Controller/UserStatusController.php2
-rw-r--r--apps/user_status/tests/Unit/Controller/UserStatusControllerTest.php2
2 files changed, 2 insertions, 2 deletions
diff --git a/apps/user_status/lib/Controller/UserStatusController.php b/apps/user_status/lib/Controller/UserStatusController.php
index 3beb8abc3ab..a85f4f1353a 100644
--- a/apps/user_status/lib/Controller/UserStatusController.php
+++ b/apps/user_status/lib/Controller/UserStatusController.php
@@ -149,7 +149,7 @@ class UserStatusController extends OCSController {
?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);
diff --git a/apps/user_status/tests/Unit/Controller/UserStatusControllerTest.php b/apps/user_status/tests/Unit/Controller/UserStatusControllerTest.php
index 6161eb100ec..d3b6d2002e0 100644
--- a/apps/user_status/tests/Unit/Controller/UserStatusControllerTest.php
+++ b/apps/user_status/tests/Unit/Controller/UserStatusControllerTest.php
@@ -330,7 +330,7 @@ class UserStatusControllerTest extends TestCase {
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,