aboutsummaryrefslogtreecommitdiffstats
path: root/apps/user_status/lib/Service/StatusService.php
diff options
context:
space:
mode:
authorblizzz <blizzz@arthur-schiwon.de>2021-06-07 12:12:33 +0200
committerGitHub <noreply@github.com>2021-06-07 12:12:33 +0200
commit56b68ce4e07835ecb806bc996e5648e433c5650b (patch)
tree4df62595b80d2ece7900f4f29fc8cf60f48637ef /apps/user_status/lib/Service/StatusService.php
parent92d19bd79bb9c8c541acabdd29c7cba065a54579 (diff)
parent55c44580c26aed3185f10eec5e943b8e82166d04 (diff)
downloadnextcloud-server-56b68ce4e07835ecb806bc996e5648e433c5650b.tar.gz
nextcloud-server-56b68ce4e07835ecb806bc996e5648e433c5650b.zip
Merge pull request #27375 from nextcloud/bugfix/noid/dont-update-offline-status
Don't update statuses to offline again and again
Diffstat (limited to 'apps/user_status/lib/Service/StatusService.php')
-rw-r--r--apps/user_status/lib/Service/StatusService.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/user_status/lib/Service/StatusService.php b/apps/user_status/lib/Service/StatusService.php
index 7f77070a87d..f121089ad8e 100644
--- a/apps/user_status/lib/Service/StatusService.php
+++ b/apps/user_status/lib/Service/StatusService.php
@@ -356,6 +356,10 @@ class StatusService {
* @param UserStatus $status
*/
private function cleanStatus(UserStatus $status): void {
+ if ($status->getStatus() === IUserStatus::OFFLINE && !$status->getIsUserDefined()) {
+ return;
+ }
+
$status->setStatus(IUserStatus::OFFLINE);
$status->setStatusTimestamp($this->timeFactory->getTime());
$status->setIsUserDefined(false);