aboutsummaryrefslogtreecommitdiffstats
path: root/apps/user_status/lib/Service
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2021-06-04 12:03:16 +0200
committerJoas Schilling <coding@schilljs.com>2021-06-07 09:32:00 +0200
commit55c44580c26aed3185f10eec5e943b8e82166d04 (patch)
tree2219edefe0bbd65b5829c334b088484132af579e /apps/user_status/lib/Service
parent46dbc8fa988176e4a431cafcbae6674fb613c899 (diff)
downloadnextcloud-server-55c44580c26aed3185f10eec5e943b8e82166d04.tar.gz
nextcloud-server-55c44580c26aed3185f10eec5e943b8e82166d04.zip
Don't update statuses to offline again and again
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps/user_status/lib/Service')
-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 39edad35850..1545e3da4f0 100644
--- a/apps/user_status/lib/Service/StatusService.php
+++ b/apps/user_status/lib/Service/StatusService.php
@@ -355,6 +355,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);