diff options
author | Anna Larch <anna@nextcloud.com> | 2023-12-15 11:07:09 +0100 |
---|---|---|
committer | Anna Larch <anna@nextcloud.com> | 2023-12-18 11:35:00 +0100 |
commit | fc4ef6133b6f236a9eb56d7c302eeb43b9d07e9d (patch) | |
tree | 64ef84c779ce39488b99456d30cfc5edb3c5f4cc /apps/dav/lib/BackgroundJob | |
parent | 0ff674607f1bbf108d4318a8844f7d3f7e7a2cd6 (diff) | |
download | nextcloud-server-fc4ef6133b6f236a9eb56d7c302eeb43b9d07e9d.tar.gz nextcloud-server-fc4ef6133b6f236a9eb56d7c302eeb43b9d07e9d.zip |
fix(ooo): add new ooo status with new emoji
Signed-off-by: Anna Larch <anna@nextcloud.com>
Diffstat (limited to 'apps/dav/lib/BackgroundJob')
-rw-r--r-- | apps/dav/lib/BackgroundJob/UserStatusAutomation.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/dav/lib/BackgroundJob/UserStatusAutomation.php b/apps/dav/lib/BackgroundJob/UserStatusAutomation.php index 60c53e9bd08..5f88fa122b7 100644 --- a/apps/dav/lib/BackgroundJob/UserStatusAutomation.php +++ b/apps/dav/lib/BackgroundJob/UserStatusAutomation.php @@ -89,7 +89,7 @@ class UserStatusAutomation extends TimedJob { $this->logger->info('Removing ' . self::class . ' background job for user "' . $userId . '" because the user has no valid availability rules and no OOO data set'); $this->jobList->remove(self::class, $argument); $this->manager->revertUserStatus($user->getUID(), IUserStatus::MESSAGE_AVAILABILITY, IUserStatus::DND); - $this->manager->revertUserStatus($user->getUID(), IUserStatus::MESSAGE_VACATION, IUserStatus::DND); + $this->manager->revertUserStatus($user->getUID(), IUserStatus::MESSAGE_OUT_OF_OFFICE, IUserStatus::DND); return; } @@ -227,7 +227,7 @@ class UserStatusAutomation extends TimedJob { if(empty($ooo)) { // Reset the user status if the absence doesn't exist $this->logger->debug('User has no OOO period in effect, reverting DND status if applicable'); - $this->manager->revertUserStatus($user->getUID(), IUserStatus::MESSAGE_VACATION, IUserStatus::DND); + $this->manager->revertUserStatus($user->getUID(), IUserStatus::MESSAGE_OUT_OF_OFFICE, IUserStatus::DND); // We need to also run the availability automation return true; } @@ -235,7 +235,7 @@ class UserStatusAutomation extends TimedJob { if(!$this->coordinator->isInEffect($ooo)) { // Reset the user status if the absence is (no longer) in effect $this->logger->debug('User has no OOO period in effect, reverting DND status if applicable'); - $this->manager->revertUserStatus($user->getUID(), IUserStatus::MESSAGE_VACATION, IUserStatus::DND); + $this->manager->revertUserStatus($user->getUID(), IUserStatus::MESSAGE_OUT_OF_OFFICE, IUserStatus::DND); if($ooo->getStartDate() > $this->time->getTime()) { // Set the next run to take place at the start of the ooo period if it is in the future @@ -250,7 +250,7 @@ class UserStatusAutomation extends TimedJob { // Revert both a possible 'CALL - away' and 'office hours - DND' status $this->manager->revertUserStatus($user->getUID(), IUserStatus::MESSAGE_CALL, IUserStatus::DND); $this->manager->revertUserStatus($user->getUID(), IUserStatus::MESSAGE_AVAILABILITY, IUserStatus::DND); - $this->manager->setUserStatus($user->getUID(), IUserStatus::MESSAGE_VACATION, IUserStatus::DND, true, $ooo->getShortMessage()); + $this->manager->setUserStatus($user->getUID(), IUserStatus::MESSAGE_OUT_OF_OFFICE, IUserStatus::DND, true, $ooo->getShortMessage()); // Run at the end of an ooo period to return to availability / regular user status // If it's overwritten by a custom status in the meantime, there's nothing we can do about it $this->setLastRunToNextToggleTime($user->getUID(), $ooo->getEndDate()); |