-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(user status): automate user status for events
and automatically set a user status to free or busy depending on their calendar transparency, event status and availability settings Signed-off-by: Anna Larch <[email protected]>
- Loading branch information
1 parent
a08281c
commit fc9f805
Showing
17 changed files
with
2,347 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<?php | ||
declare(strict_types=1); | ||
/* | ||
* * | ||
* * | ||
* * @copyright 2023 Anna Larch <[email protected]> | ||
* * | ||
* * @author Anna Larch <[email protected]> | ||
* * | ||
* * This library is free software; you can redistribute it and/or | ||
* * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE | ||
* * License as published by the Free Software Foundation; either | ||
* * version 3 of the License, or any later version. | ||
* * | ||
* * This library 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 library. If not, see <http://www.gnu.org/licenses/>. | ||
* * | ||
* | ||
*/ | ||
|
||
namespace OCA\DAV\CalDAV\FreeBusy; | ||
|
||
use DateTimeInterface; | ||
use DateTimeZone; | ||
use Sabre\VObject\Component\VCalendar; | ||
|
||
/** | ||
* @psalm-suppress PropertyNotSetInConstructor | ||
*/ | ||
class FreeBusyGenerator extends \Sabre\VObject\FreeBusyGenerator { | ||
|
||
public function __construct() { | ||
parent::__construct(); | ||
} | ||
|
||
public function getVCalendar(): VCalendar { | ||
return new VCalendar(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<?php | ||
/* | ||
* * | ||
* * Dav App | ||
* * | ||
* * @copyright 2023 Anna Larch <[email protected]> | ||
* * | ||
* * @author Anna Larch <[email protected]> | ||
* * | ||
* * This library is free software; you can redistribute it and/or | ||
* * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE | ||
* * License as published by the Free Software Foundation; either | ||
* * version 3 of the License, or any later version. | ||
* * | ||
* * This library 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 library. If not, see <http://www.gnu.org/licenses/>. | ||
* * | ||
* | ||
*/ | ||
|
||
namespace OCA\DAV\CalDAV\Status; | ||
|
||
class Status { | ||
|
||
public function __construct(private string $status = '', private ?string $message = null, private ?string $customMessage = null){} | ||
|
||
public function getStatus(): string { | ||
return $this->status; | ||
} | ||
|
||
public function setStatus(string $status): void { | ||
$this->status = $status; | ||
} | ||
|
||
public function getMessage(): ?string { | ||
return $this->message; | ||
} | ||
|
||
public function setMessage(?string $message): void { | ||
$this->message = $message; | ||
} | ||
|
||
public function getCustomMessage(): ?string { | ||
return $this->customMessage; | ||
} | ||
|
||
public function setCustomMessage(?string $customMessage): void { | ||
$this->customMessage = $customMessage; | ||
} | ||
|
||
|
||
} |
Oops, something went wrong.