Merge pull request #44878 from nextcloud/bugfix/44877/keep-manually-restored-status

fix(status): Update status time when reverting to it manually
This commit is contained in:
Joas Schilling 2024-04-17 15:18:35 +02:00 committed by GitHub
commit f325e404d6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 3 deletions

View File

@ -532,9 +532,12 @@ class StatusService {
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);