From 17cf28638981f9fe64d8778dbf5f6e82c641e2bb Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 17 Apr 2024 11:32:16 +0200 Subject: [PATCH] fix(status): Update status time when reverting to it manually This prevents the DAV meeting status from overwriting it again Signed-off-by: Joas Schilling --- apps/user_status/lib/Service/StatusService.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/apps/user_status/lib/Service/StatusService.php b/apps/user_status/lib/Service/StatusService.php index be3a12ef44dea..d6e857520dfa6 100644 --- a/apps/user_status/lib/Service/StatusService.php +++ b/apps/user_status/lib/Service/StatusService.php @@ -532,9 +532,12 @@ public function revertUserStatus(string $userId, string $messageId, bool $revert return null; } - if ($revertedManually && $backupUserStatus->getStatus() === IUserStatus::OFFLINE) { - // When the user reverts the status manually they are online - $backupUserStatus->setStatus(IUserStatus::ONLINE); + if ($revertedManually) { + if ($backupUserStatus->getStatus() === IUserStatus::OFFLINE) { + // When the user reverts the status manually they are online + $backupUserStatus->setStatus(IUserStatus::ONLINE); + } + $backupUserStatus->setStatusTimestamp($this->timeFactory->getTime()); } $backupUserStatus->setIsBackup(false);