diff options
author | Joas Schilling <213943+nickvergessen@users.noreply.github.com> | 2024-04-17 15:18:35 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-17 15:18:35 +0200 |
commit | f325e404d6b866b44fd2969a8533d35a89cd6934 (patch) | |
tree | 7c5d4351925bdfe6f9a8dbc29fd0dbdeb17fa020 | |
parent | a86c1131d7092b4abb1abac8a55f2e71f7a2bbaa (diff) | |
parent | 587a056db35a1446f45c21f86ab66cf73be83426 (diff) | |
download | nextcloud-server-f325e404d6b866b44fd2969a8533d35a89cd6934.tar.gz nextcloud-server-f325e404d6b866b44fd2969a8533d35a89cd6934.zip |
Merge pull request #44878 from nextcloud/bugfix/44877/keep-manually-restored-status
fix(status): Update status time when reverting to it manually
-rw-r--r-- | apps/user_status/lib/Service/StatusService.php | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/apps/user_status/lib/Service/StatusService.php b/apps/user_status/lib/Service/StatusService.php index be3a12ef44d..d6e857520df 100644 --- a/apps/user_status/lib/Service/StatusService.php +++ b/apps/user_status/lib/Service/StatusService.php @@ -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); |