From 55c44580c26aed3185f10eec5e943b8e82166d04 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Fri, 4 Jun 2021 12:03:16 +0200 Subject: Don't update statuses to offline again and again Signed-off-by: Joas Schilling --- apps/user_status/lib/Service/StatusService.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'apps/user_status/lib/Service/StatusService.php') 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); -- cgit v1.2.3