diff options
Diffstat (limited to 'apps/user_status/lib')
-rw-r--r-- | apps/user_status/lib/Service/StatusService.php | 8 |
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); |