summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Wurst <ChristophWurst@users.noreply.github.com>2024-02-16 17:02:56 +0100
committerGitHub <noreply@github.com>2024-02-16 17:02:56 +0100
commite108fd2753d40143d556354cab6624fd37508350 (patch)
tree47a91435d46af7a6228e5f92b27bdaf1d689efb2
parente622875f85746b18c45351f9c144ed085d5d6f98 (diff)
parentca179b7263a7f43c5248958240163ceea0c70532 (diff)
downloadnextcloud-server-e108fd2753d40143d556354cab6624fd37508350.tar.gz
nextcloud-server-e108fd2753d40143d556354cab6624fd37508350.zip
Merge pull request #43530 from nextcloud/backport/43464/stable28
[stable28] fix(userstatus): add back 0 timestamp for status without message
-rw-r--r--apps/user_status/lib/Service/StatusService.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/apps/user_status/lib/Service/StatusService.php b/apps/user_status/lib/Service/StatusService.php
index 813f6b9d4e1..be3a12ef44d 100644
--- a/apps/user_status/lib/Service/StatusService.php
+++ b/apps/user_status/lib/Service/StatusService.php
@@ -297,7 +297,13 @@ class StatusService {
$userStatus->setCustomIcon(null);
$userStatus->setCustomMessage($customMessage);
$userStatus->setClearAt(null);
- $userStatus->setStatusMessageTimestamp($this->timeFactory->now()->getTimestamp());
+ if ($this->predefinedStatusService->getTranslatedStatusForId($messageId) !== null
+ || ($customMessage !== null && $customMessage !== '')) {
+ // Only track status message ID if there is one
+ $userStatus->setStatusMessageTimestamp($this->timeFactory->now()->getTimestamp());
+ } else {
+ $userStatus->setStatusMessageTimestamp(0);
+ }
if ($userStatus->getId() !== null) {
return $this->mapper->update($userStatus);