diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2023-12-01 10:46:16 +0100 |
---|---|---|
committer | Andy Scherzinger <info@andy-scherzinger.de> | 2023-12-06 00:15:59 +0100 |
commit | df4a76a4e6c92c2b51c8647be6a836e53d009aef (patch) | |
tree | 10bf0af1cad2c0c02e16ea98dc68a80334966eb1 /lib/public | |
parent | fa1c1ac19d3fab19b956ddc8724432f5b6792e9d (diff) | |
download | nextcloud-server-df4a76a4e6c92c2b51c8647be6a836e53d009aef.tar.gz nextcloud-server-df4a76a4e6c92c2b51c8647be6a836e53d009aef.zip |
fix(dav): Make current ooo info time-dependent
* If there is an out of office absence info and it happens now -> return
data
* Else: return no data
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib/public')
-rw-r--r-- | lib/public/User/IOutOfOfficeData.php | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/lib/public/User/IOutOfOfficeData.php b/lib/public/User/IOutOfOfficeData.php index 03444449d58..31281104382 100644 --- a/lib/public/User/IOutOfOfficeData.php +++ b/lib/public/User/IOutOfOfficeData.php @@ -25,14 +25,24 @@ declare(strict_types=1); namespace OCP\User; +use JsonSerializable; use OCP\IUser; /** * DTO to hold out-of-office information of a user * + * @psalm-type OutOfOfficeData = array{ + * id: string, + * userId: string, + * startDate: int, + * endDate: int, + * shortMessage: string, + * message: string, + * } + * * @since 28.0.0 */ -interface IOutOfOfficeData { +interface IOutOfOfficeData extends JsonSerializable { /** * Get the unique token assigned to the current out-of-office event * @@ -74,4 +84,11 @@ interface IOutOfOfficeData { * @since 28.0.0 */ public function getMessage(): string; + + /** + * @return OutOfOfficeData + * + * @since 28.0.0 + */ + public function jsonSerialize(): array; } |