aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/User/OutOfOfficeData.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/User/OutOfOfficeData.php')
-rw-r--r--lib/private/User/OutOfOfficeData.php38
1 files changed, 18 insertions, 20 deletions
diff --git a/lib/private/User/OutOfOfficeData.php b/lib/private/User/OutOfOfficeData.php
index 72e42afab6a..0d4e142567e 100644
--- a/lib/private/User/OutOfOfficeData.php
+++ b/lib/private/User/OutOfOfficeData.php
@@ -3,24 +3,8 @@
declare(strict_types=1);
/**
- * @copyright 2023 Christoph Wurst <christoph@winzerhof-wurst.at>
- *
- * @author 2023 Christoph Wurst <christoph@winzerhof-wurst.at>
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero 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 Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero 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 OC\User;
@@ -29,12 +13,16 @@ use OCP\IUser;
use OCP\User\IOutOfOfficeData;
class OutOfOfficeData implements IOutOfOfficeData {
- public function __construct(private string $id,
+ public function __construct(
+ private string $id,
private IUser $user,
private int $startDate,
private int $endDate,
private string $shortMessage,
- private string $message) {
+ private string $message,
+ private ?string $replacementUserId,
+ private ?string $replacementUserDisplayName,
+ ) {
}
public function getId(): string {
@@ -61,6 +49,14 @@ class OutOfOfficeData implements IOutOfOfficeData {
return $this->message;
}
+ public function getReplacementUserId(): ?string {
+ return $this->replacementUserId;
+ }
+
+ public function getReplacementUserDisplayName(): ?string {
+ return $this->replacementUserDisplayName;
+ }
+
public function jsonSerialize(): array {
return [
'id' => $this->getId(),
@@ -69,6 +65,8 @@ class OutOfOfficeData implements IOutOfOfficeData {
'endDate' => $this->getEndDate(),
'shortMessage' => $this->getShortMessage(),
'message' => $this->getMessage(),
+ 'replacementUserId' => $this->getReplacementUserId(),
+ 'replacementUserDisplayName' => $this->getReplacementUserDisplayName(),
];
}
}