Browse Source
fix(api): Properly typed defaultPermissions update
fix(api): Properly typed defaultPermissions update
Signed-off-by: Joas Schilling <coding@schilljs.com>pull/13167/head
No known key found for this signature in database
GPG Key ID: 74434EFE0D2E2205
3 changed files with 46 additions and 10 deletions
-
9lib/Controller/RoomController.php
-
31lib/Exceptions/RoomProperty/DefaultPermissionsException.php
-
16lib/Service/RoomService.php
@ -0,0 +1,31 @@ |
|||||
|
<?php |
||||
|
|
||||
|
declare(strict_types=1); |
||||
|
/** |
||||
|
* SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors |
||||
|
* SPDX-License-Identifier: AGPL-3.0-or-later |
||||
|
*/ |
||||
|
|
||||
|
namespace OCA\Talk\Exceptions\RoomProperty; |
||||
|
|
||||
|
class DefaultPermissionsException extends \InvalidArgumentException { |
||||
|
public const REASON_BREAKOUT_ROOM = 'breakout-room'; |
||||
|
public const REASON_TYPE = 'type'; |
||||
|
public const REASON_VALUE = 'value'; |
||||
|
|
||||
|
/** |
||||
|
* @param self::REASON_* $reason |
||||
|
*/ |
||||
|
public function __construct( |
||||
|
protected string $reason, |
||||
|
) { |
||||
|
parent::__construct($reason); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @return self::REASON_* |
||||
|
*/ |
||||
|
public function getReason(): string { |
||||
|
return $this->reason; |
||||
|
} |
||||
|
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue