Skip to content

Commit

Permalink
Merge pull request #44885 from nextcloud/backport/44878/stable29
Browse files Browse the repository at this point in the history
[stable29] fix(status): Update status time when reverting to it manually
  • Loading branch information
nickvergessen authored Apr 17, 2024
2 parents 643be3c + 17cf286 commit 053cb74
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 053cb74

Please sign in to comment.