aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav/lib/Service/AbsenceService.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/dav/lib/Service/AbsenceService.php')
-rw-r--r--apps/dav/lib/Service/AbsenceService.php25
1 files changed, 6 insertions, 19 deletions
diff --git a/apps/dav/lib/Service/AbsenceService.php b/apps/dav/lib/Service/AbsenceService.php
index 3e2a218d52b..7cbc0386d43 100644
--- a/apps/dav/lib/Service/AbsenceService.php
+++ b/apps/dav/lib/Service/AbsenceService.php
@@ -3,25 +3,8 @@
declare(strict_types=1);
/**
- * @copyright Copyright (c) 2023 Richard Steinmetz <richard@steinmetz.cloud>
- *
- * @author Richard Steinmetz <richard@steinmetz.cloud>
- *
- * @license AGPL-3.0-or-later
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
+ * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace OCA\DAV\Service;
@@ -64,6 +47,8 @@ class AbsenceService {
string $lastDay,
string $status,
string $message,
+ ?string $replacementUserId = null,
+ ?string $replacementUserDisplayName = null,
): Absence {
try {
$absence = $this->absenceMapper->findByUserId($user->getUID());
@@ -76,6 +61,8 @@ class AbsenceService {
$absence->setLastDay($lastDay);
$absence->setStatus($status);
$absence->setMessage($message);
+ $absence->setReplacementUserId($replacementUserId);
+ $absence->setReplacementUserDisplayName($replacementUserDisplayName);
if ($absence->getId() === null) {
$absence = $this->absenceMapper->insert($absence);