mirror of
https://github.com/nextcloud/server.git
synced 2026-05-25 18:52:53 -04:00
Merge pull request #37200 from nextcloud/backport/37167/stable25
[stable25] fix(dav): Handle no next potential toggle in availability detection
This commit is contained in:
commit
ab6fdbe631
1 changed files with 7 additions and 0 deletions
|
|
@ -139,6 +139,13 @@ class UserStatusAutomation extends TimedJob {
|
|||
}
|
||||
}
|
||||
|
||||
if (empty($nextPotentialToggles)) {
|
||||
$this->logger->info('Removing ' . self::class . ' background job for user "' . $userId . '" because the user has no valid availability rules set');
|
||||
$this->jobList->remove(self::class, $argument);
|
||||
$this->manager->revertUserStatus($userId, IUserStatus::MESSAGE_AVAILABILITY, IUserStatus::DND);
|
||||
return;
|
||||
}
|
||||
|
||||
$nextAutomaticToggle = min($nextPotentialToggles);
|
||||
$this->setLastRunToNextToggleTime($userId, $nextAutomaticToggle - 1);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue