Skip to content

Commit

Permalink
fix(status): Update status time when reverting to it manually
Browse files Browse the repository at this point in the history
This prevents the DAV meeting status from overwriting it again

Signed-off-by: Joas Schilling <[email protected]>
  • Loading branch information
nickvergessen authored and backportbot[bot] committed Apr 17, 2024
1 parent 38bd20b commit 17cf286
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions apps/user_status/lib/Service/StatusService.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 17cf286

Please sign in to comment.