diff options
Diffstat (limited to 'lib/private/User/OutOfOfficeData.php')
-rw-r--r-- | lib/private/User/OutOfOfficeData.php | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/lib/private/User/OutOfOfficeData.php b/lib/private/User/OutOfOfficeData.php index 65d7c9c24cb..0d4e142567e 100644 --- a/lib/private/User/OutOfOfficeData.php +++ b/lib/private/User/OutOfOfficeData.php @@ -13,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 { @@ -45,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(), @@ -53,6 +65,8 @@ class OutOfOfficeData implements IOutOfOfficeData { 'endDate' => $this->getEndDate(), 'shortMessage' => $this->getShortMessage(), 'message' => $this->getMessage(), + 'replacementUserId' => $this->getReplacementUserId(), + 'replacementUserDisplayName' => $this->getReplacementUserDisplayName(), ]; } } |