aboutsummaryrefslogtreecommitdiffstats
path: root/apps/user_status/lib/Service
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2023-09-21 17:05:06 +0200
committerChristoph Wurst <christoph@winzerhof-wurst.at>2023-09-29 09:55:19 +0200
commitfbdf733be0df1bf00f8903a98ccabdf519db55d2 (patch)
treed0e4fdeaa14319452d1d24938fb5c355dd30e82e /apps/user_status/lib/Service
parentf8f437072ac13a4556dea18219d55f11466497e5 (diff)
downloadnextcloud-server-fbdf733be0df1bf00f8903a98ccabdf519db55d2.tar.gz
nextcloud-server-fbdf733be0df1bf00f8903a98ccabdf519db55d2.zip
fix(userstatus): Track message timestamp too
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'apps/user_status/lib/Service')
-rw-r--r--apps/user_status/lib/Service/StatusService.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/apps/user_status/lib/Service/StatusService.php b/apps/user_status/lib/Service/StatusService.php
index b5dd3cd361a..f9ae769a5a9 100644
--- a/apps/user_status/lib/Service/StatusService.php
+++ b/apps/user_status/lib/Service/StatusService.php
@@ -237,6 +237,7 @@ class StatusService {
$userStatus->setCustomIcon(null);
$userStatus->setCustomMessage(null);
$userStatus->setClearAt($clearAt);
+ $userStatus->setStatusMessageTimestamp($this->timeFactory->now()->getTimestamp());
if ($userStatus->getId() === null) {
return $this->mapper->insert($userStatus);
@@ -291,6 +292,7 @@ class StatusService {
$userStatus->setCustomIcon(null);
$userStatus->setCustomMessage(null);
$userStatus->setClearAt(null);
+ $userStatus->setStatusMessageTimestamp($this->timeFactory->now()->getTimestamp());
if ($userStatus->getId() !== null) {
$this->mapper->update($userStatus);
@@ -340,6 +342,7 @@ class StatusService {
$userStatus->setCustomIcon($statusIcon);
$userStatus->setCustomMessage($message);
$userStatus->setClearAt($clearAt);
+ $userStatus->setStatusMessageTimestamp($this->timeFactory->now()->getTimestamp());
if ($userStatus->getId() === null) {
return $this->mapper->insert($userStatus);
@@ -384,6 +387,7 @@ class StatusService {
$userStatus->setCustomMessage(null);
$userStatus->setCustomIcon(null);
$userStatus->setClearAt(null);
+ $userStatus->setStatusMessageTimestamp(0);
$this->mapper->update($userStatus);
return true;
@@ -465,6 +469,7 @@ class StatusService {
$status->setCustomIcon(null);
$status->setCustomMessage(null);
$status->setClearAt(null);
+ $status->setStatusMessageTimestamp(0);
$this->mapper->update($status);
}
@@ -478,6 +483,7 @@ class StatusService {
if ($predefinedMessage !== null) {
$status->setCustomMessage($predefinedMessage['message']);
$status->setCustomIcon($predefinedMessage['icon']);
+ $status->setStatusMessageTimestamp($this->timeFactory->now()->getTimestamp());
}
}