diff --git a/lib/Controller/AEnvironmentAwareController.php b/lib/Controller/AEnvironmentAwareOCSController.php similarity index 96% rename from lib/Controller/AEnvironmentAwareController.php rename to lib/Controller/AEnvironmentAwareOCSController.php index 25cfa808360..988e5115216 100644 --- a/lib/Controller/AEnvironmentAwareController.php +++ b/lib/Controller/AEnvironmentAwareOCSController.php @@ -14,7 +14,7 @@ use OCA\Talk\Room; use OCP\AppFramework\OCSController; -abstract class AEnvironmentAwareController extends OCSController { +abstract class AEnvironmentAwareOCSController extends OCSController { protected int $apiVersion = 1; protected ?Room $room = null; protected ?Participant $participant = null; diff --git a/lib/Controller/AvatarController.php b/lib/Controller/AvatarController.php index 6028530aaa9..82b94cc950a 100644 --- a/lib/Controller/AvatarController.php +++ b/lib/Controller/AvatarController.php @@ -37,7 +37,7 @@ /** * @psalm-import-type TalkRoom from ResponseDefinitions */ -class AvatarController extends AEnvironmentAwareController { +class AvatarController extends AEnvironmentAwareOCSController { public function __construct( string $appName, IRequest $request, diff --git a/lib/Controller/BanController.php b/lib/Controller/BanController.php index bd50262da82..6501a76e8ed 100644 --- a/lib/Controller/BanController.php +++ b/lib/Controller/BanController.php @@ -22,7 +22,7 @@ /** * @psalm-import-type TalkBan from ResponseDefinitions */ -class BanController extends AEnvironmentAwareController { +class BanController extends AEnvironmentAwareOCSController { public function __construct( string $appName, IRequest $request, diff --git a/lib/Controller/BotController.php b/lib/Controller/BotController.php index 8b741e66d2f..c061eca3b51 100644 --- a/lib/Controller/BotController.php +++ b/lib/Controller/BotController.php @@ -48,7 +48,7 @@ * @psalm-import-type TalkBot from ResponseDefinitions * @psalm-import-type TalkBotWithDetails from ResponseDefinitions */ -class BotController extends AEnvironmentAwareController { +class BotController extends AEnvironmentAwareOCSController { public function __construct( string $appName, IRequest $request, diff --git a/lib/Controller/BreakoutRoomController.php b/lib/Controller/BreakoutRoomController.php index 07b418eb27a..71578c6e56f 100644 --- a/lib/Controller/BreakoutRoomController.php +++ b/lib/Controller/BreakoutRoomController.php @@ -26,7 +26,7 @@ /** * @psalm-import-type TalkRoom from ResponseDefinitions */ -class BreakoutRoomController extends AEnvironmentAwareController { +class BreakoutRoomController extends AEnvironmentAwareOCSController { public function __construct( string $appName, IRequest $request, diff --git a/lib/Controller/CallController.php b/lib/Controller/CallController.php index e0deedc6536..8128e4314f1 100644 --- a/lib/Controller/CallController.php +++ b/lib/Controller/CallController.php @@ -45,7 +45,7 @@ /** * @psalm-import-type TalkCallPeer from ResponseDefinitions */ -class CallController extends AEnvironmentAwareController { +class CallController extends AEnvironmentAwareOCSController { public function __construct( string $appName, @@ -282,7 +282,7 @@ protected function validateRecordingConsent(bool $recordingConsent): void { } /** - * Join call on the host server using the session id of the federated user. + * Join call on the host server using the session id of the federated user * * @param string $sessionId Federated session id to join with * @param int<0, 15>|null $flags In-Call flags @@ -449,7 +449,7 @@ public function updateCallFlags(int $flags): DataResponse { /** * Update the in-call flags on the host server using the session id of the - * federated user. + * federated user * * @param string $sessionId Federated session id to update the flags with * @param int<0, 15> $flags New flags @@ -531,7 +531,7 @@ public function leaveCall(bool $all = false): DataResponse { /** * Leave a call on the host server using the session id of the federated - * user. + * user * * @param string $sessionId Federated session id to leave with * @return DataResponse diff --git a/lib/Controller/ChatController.php b/lib/Controller/ChatController.php index 361b96c248f..6645ebd09d1 100644 --- a/lib/Controller/ChatController.php +++ b/lib/Controller/ChatController.php @@ -88,7 +88,7 @@ * @psalm-import-type TalkRichObjectParameter from ResponseDefinitions * @psalm-import-type TalkRoom from ResponseDefinitions */ -class ChatController extends AEnvironmentAwareController { +class ChatController extends AEnvironmentAwareOCSController { /** @var string[] */ protected array $guestNames; diff --git a/lib/Controller/GuestController.php b/lib/Controller/GuestController.php index 8142962c198..9fbadc48828 100644 --- a/lib/Controller/GuestController.php +++ b/lib/Controller/GuestController.php @@ -16,7 +16,7 @@ use OCP\AppFramework\Http\DataResponse; use OCP\IRequest; -class GuestController extends AEnvironmentAwareController { +class GuestController extends AEnvironmentAwareOCSController { public function __construct( string $appName, diff --git a/lib/Controller/MatterbridgeController.php b/lib/Controller/MatterbridgeController.php index 3587c4d0bbe..495687a1fad 100644 --- a/lib/Controller/MatterbridgeController.php +++ b/lib/Controller/MatterbridgeController.php @@ -24,7 +24,7 @@ * @psalm-import-type TalkMatterbridgeProcessState from ResponseDefinitions * @psalm-import-type TalkMatterbridgeWithProcessState from ResponseDefinitions */ -class MatterbridgeController extends AEnvironmentAwareController { +class MatterbridgeController extends AEnvironmentAwareOCSController { public function __construct( string $appName, diff --git a/lib/Controller/PollController.php b/lib/Controller/PollController.php index 02db3d10d14..a9c3fb3d132 100644 --- a/lib/Controller/PollController.php +++ b/lib/Controller/PollController.php @@ -37,7 +37,7 @@ * @psalm-import-type TalkPoll from ResponseDefinitions * @psalm-import-type TalkPollDraft from ResponseDefinitions */ -class PollController extends AEnvironmentAwareController { +class PollController extends AEnvironmentAwareOCSController { public function __construct( string $appName, diff --git a/lib/Controller/ReactionController.php b/lib/Controller/ReactionController.php index e84b84365cd..ee1c6af8bab 100644 --- a/lib/Controller/ReactionController.php +++ b/lib/Controller/ReactionController.php @@ -27,7 +27,7 @@ /** * @psalm-import-type TalkReaction from ResponseDefinitions */ -class ReactionController extends AEnvironmentAwareController { +class ReactionController extends AEnvironmentAwareOCSController { public function __construct( string $appName, diff --git a/lib/Controller/RecordingController.php b/lib/Controller/RecordingController.php index 7b7d4bc7c28..8f423739073 100644 --- a/lib/Controller/RecordingController.php +++ b/lib/Controller/RecordingController.php @@ -32,7 +32,7 @@ use OCP\IRequest; use Psr\Log\LoggerInterface; -class RecordingController extends AEnvironmentAwareController { +class RecordingController extends AEnvironmentAwareOCSController { public function __construct( string $appName, IRequest $request, diff --git a/lib/Controller/RoomController.php b/lib/Controller/RoomController.php index 410398b7317..de4d43a8374 100644 --- a/lib/Controller/RoomController.php +++ b/lib/Controller/RoomController.php @@ -92,7 +92,7 @@ * @psalm-import-type TalkParticipant from ResponseDefinitions * @psalm-import-type TalkRoom from ResponseDefinitions */ -class RoomController extends AEnvironmentAwareController { +class RoomController extends AEnvironmentAwareOCSController { protected array $commonReadMessages = []; public function __construct( @@ -1771,7 +1771,7 @@ public function joinRoom(string $token, string $password = '', bool $force = tru } /** - * Join room on the host server using the session id of the federated user. + * Join room on the host server using the session id of the federated user * * The session id can be null only for requests from Talk < 20. * @@ -2058,7 +2058,7 @@ public function leaveRoom(string $token): DataResponse { } /** - * Leave room on the host server using the session id of the federated user. + * Leave room on the host server using the session id of the federated user * * @param string $token Token of the room * @param string $sessionId Federated session id to leave with diff --git a/lib/Middleware/InjectionMiddleware.php b/lib/Middleware/InjectionMiddleware.php index 62725f86685..3fedda64495 100644 --- a/lib/Middleware/InjectionMiddleware.php +++ b/lib/Middleware/InjectionMiddleware.php @@ -8,7 +8,7 @@ namespace OCA\Talk\Middleware; -use OCA\Talk\Controller\AEnvironmentAwareController; +use OCA\Talk\Controller\AEnvironmentAwareOCSController; use OCA\Talk\Exceptions\CannotReachRemoteException; use OCA\Talk\Exceptions\ForbiddenException; use OCA\Talk\Exceptions\ParticipantNotFoundException; @@ -86,7 +86,7 @@ public function __construct( * @throws RoomNotFoundException */ public function beforeController(Controller $controller, string $methodName): void { - if (!$controller instanceof AEnvironmentAwareController) { + if (!$controller instanceof AEnvironmentAwareOCSController) { return; } @@ -173,10 +173,10 @@ protected function readSessionIdParameterFromAttributes(array $attributes): ?str } /** - * @param AEnvironmentAwareController $controller + * @param AEnvironmentAwareOCSController $controller * @throws ForbiddenException */ - protected function getRoom(AEnvironmentAwareController $controller): void { + protected function getRoom(AEnvironmentAwareOCSController $controller): void { $token = $this->request->getParam('token'); $room = $this->manager->getRoomByToken($token); $controller->setRoom($room); @@ -185,11 +185,11 @@ protected function getRoom(AEnvironmentAwareController $controller): void { } /** - * @param AEnvironmentAwareController $controller + * @param AEnvironmentAwareOCSController $controller * @param bool $moderatorRequired * @throws NotAModeratorException */ - protected function getLoggedIn(AEnvironmentAwareController $controller, bool $moderatorRequired): void { + protected function getLoggedIn(AEnvironmentAwareOCSController $controller, bool $moderatorRequired): void { $token = $this->request->getParam('token'); $sessionId = $this->talkSession->getSessionForRoom($token); $room = $this->manager->getRoomForUserByToken($token, $this->userId, $sessionId); @@ -206,14 +206,14 @@ protected function getLoggedIn(AEnvironmentAwareController $controller, bool $mo } /** - * @param AEnvironmentAwareController $controller + * @param AEnvironmentAwareOCSController $controller * @param bool $moderatorRequired * @param bool $requireListedWhenNoParticipant * @throws NotAModeratorException * @throws ParticipantNotFoundException */ protected function getLoggedInOrGuest( - AEnvironmentAwareController $controller, + AEnvironmentAwareOCSController $controller, bool $moderatorRequired, bool $requireListedWhenNoParticipant = false, bool $requireFederationWhenNotLoggedIn = false, @@ -281,11 +281,11 @@ protected function getLoggedInOrGuest( } /** - * @param AEnvironmentAwareController $controller + * @param AEnvironmentAwareOCSController $controller * @throws RoomNotFoundException * @throws ParticipantNotFoundException */ - protected function getRoomByInvite(AEnvironmentAwareController $controller): void { + protected function getRoomByInvite(AEnvironmentAwareOCSController $controller): void { if ($this->userId === null) { throw new ParticipantNotFoundException('No user available'); } @@ -309,10 +309,10 @@ protected function getRoomByInvite(AEnvironmentAwareController $controller): voi } /** - * @param AEnvironmentAwareController $controller + * @param AEnvironmentAwareOCSController $controller * @throws FederationUnsupportedFeatureException */ - protected function checkFederationSupport(AEnvironmentAwareController $controller): void { + protected function checkFederationSupport(AEnvironmentAwareOCSController $controller): void { $room = $controller->getRoom(); if ($room instanceof Room && $room->isFederatedConversation()) { throw new FederationUnsupportedFeatureException(); @@ -320,10 +320,10 @@ protected function checkFederationSupport(AEnvironmentAwareController $controlle } /** - * @param AEnvironmentAwareController $controller + * @param AEnvironmentAwareOCSController $controller * @throws ReadOnlyException */ - protected function checkReadOnlyState(AEnvironmentAwareController $controller): void { + protected function checkReadOnlyState(AEnvironmentAwareOCSController $controller): void { $room = $controller->getRoom(); if (!$room instanceof Room || $room->getReadOnly() === Room::READ_ONLY) { throw new ReadOnlyException(); @@ -336,7 +336,7 @@ protected function checkReadOnlyState(AEnvironmentAwareController $controller): /** * @throws PermissionsException */ - protected function checkPermission(AEnvironmentAwareController $controller, string $permission): void { + protected function checkPermission(AEnvironmentAwareOCSController $controller, string $permission): void { $participant = $controller->getParticipant(); if (!$participant instanceof Participant) { throw new PermissionsException(); @@ -353,7 +353,7 @@ protected function checkPermission(AEnvironmentAwareController $controller, stri /** * @throws LobbyException */ - protected function checkLobbyState(AEnvironmentAwareController $controller): void { + protected function checkLobbyState(AEnvironmentAwareOCSController $controller): void { try { $this->getLoggedInOrGuest($controller, true); return; diff --git a/openapi-federation.json b/openapi-federation.json index a4b1c7f5fc2..97f1f2ec13c 100644 --- a/openapi-federation.json +++ b/openapi-federation.json @@ -1641,7 +1641,7 @@ "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/federation/active": { "post": { "operationId": "room-join-federated-room", - "summary": "Join room on the host server using the session id of the federated user.", + "summary": "Join room on the host server using the session id of the federated user", "description": "The session id can be null only for requests from Talk < 20.", "tags": [ "room" @@ -1778,7 +1778,7 @@ }, "delete": { "operationId": "room-leave-federated-room", - "summary": "Leave room on the host server using the session id of the federated user.", + "summary": "Leave room on the host server using the session id of the federated user", "tags": [ "room" ], diff --git a/openapi-full.json b/openapi-full.json index f78c358fc77..197430ef8a1 100644 --- a/openapi-full.json +++ b/openapi-full.json @@ -4650,7 +4650,7 @@ "/ocs/v2.php/apps/spreed/api/{apiVersion}/call/{token}/federation": { "post": { "operationId": "call-join-federated-call", - "summary": "Join call on the host server using the session id of the federated user.", + "summary": "Join call on the host server using the session id of the federated user", "tags": [ "call" ], @@ -4836,7 +4836,7 @@ }, "put": { "operationId": "call-update-federated-call-flags", - "summary": "Update the in-call flags on the host server using the session id of the federated user.", + "summary": "Update the in-call flags on the host server using the session id of the federated user", "tags": [ "call" ], @@ -5004,7 +5004,7 @@ }, "delete": { "operationId": "call-leave-federated-call", - "summary": "Leave a call on the host server using the session id of the federated user.", + "summary": "Leave a call on the host server using the session id of the federated user", "tags": [ "call" ], @@ -19021,7 +19021,7 @@ "/ocs/v2.php/apps/spreed/api/{apiVersion}/room/{token}/federation/active": { "post": { "operationId": "room-join-federated-room", - "summary": "Join room on the host server using the session id of the federated user.", + "summary": "Join room on the host server using the session id of the federated user", "description": "The session id can be null only for requests from Talk < 20.", "tags": [ "room" @@ -19158,7 +19158,7 @@ }, "delete": { "operationId": "room-leave-federated-room", - "summary": "Leave room on the host server using the session id of the federated user.", + "summary": "Leave room on the host server using the session id of the federated user", "tags": [ "room" ], diff --git a/openapi.json b/openapi.json index 789b60e815c..e1f0374d0d6 100644 --- a/openapi.json +++ b/openapi.json @@ -4537,7 +4537,7 @@ "/ocs/v2.php/apps/spreed/api/{apiVersion}/call/{token}/federation": { "post": { "operationId": "call-join-federated-call", - "summary": "Join call on the host server using the session id of the federated user.", + "summary": "Join call on the host server using the session id of the federated user", "tags": [ "call" ], @@ -4723,7 +4723,7 @@ }, "put": { "operationId": "call-update-federated-call-flags", - "summary": "Update the in-call flags on the host server using the session id of the federated user.", + "summary": "Update the in-call flags on the host server using the session id of the federated user", "tags": [ "call" ], @@ -4891,7 +4891,7 @@ }, "delete": { "operationId": "call-leave-federated-call", - "summary": "Leave a call on the host server using the session id of the federated user.", + "summary": "Leave a call on the host server using the session id of the federated user", "tags": [ "call" ], diff --git a/src/types/openapi/openapi-federation.ts b/src/types/openapi/openapi-federation.ts index 2e1e14c8589..ad4031ec8ce 100644 --- a/src/types/openapi/openapi-federation.ts +++ b/src/types/openapi/openapi-federation.ts @@ -126,11 +126,11 @@ export type paths = { get?: never; put?: never; /** - * Join room on the host server using the session id of the federated user. + * Join room on the host server using the session id of the federated user * @description The session id can be null only for requests from Talk < 20. */ post: operations["room-join-federated-room"]; - /** Leave room on the host server using the session id of the federated user. */ + /** Leave room on the host server using the session id of the federated user */ delete: operations["room-leave-federated-room"]; options?: never; head?: never; diff --git a/src/types/openapi/openapi-full.ts b/src/types/openapi/openapi-full.ts index b4e9fc3a280..1933ca84df4 100644 --- a/src/types/openapi/openapi-full.ts +++ b/src/types/openapi/openapi-full.ts @@ -289,11 +289,11 @@ export type paths = { cookie?: never; }; get?: never; - /** Update the in-call flags on the host server using the session id of the federated user. */ + /** Update the in-call flags on the host server using the session id of the federated user */ put: operations["call-update-federated-call-flags"]; - /** Join call on the host server using the session id of the federated user. */ + /** Join call on the host server using the session id of the federated user */ post: operations["call-join-federated-call"]; - /** Leave a call on the host server using the session id of the federated user. */ + /** Leave a call on the host server using the session id of the federated user */ delete: operations["call-leave-federated-call"]; options?: never; head?: never; @@ -1522,11 +1522,11 @@ export type paths = { get?: never; put?: never; /** - * Join room on the host server using the session id of the federated user. + * Join room on the host server using the session id of the federated user * @description The session id can be null only for requests from Talk < 20. */ post: operations["room-join-federated-room"]; - /** Leave room on the host server using the session id of the federated user. */ + /** Leave room on the host server using the session id of the federated user */ delete: operations["room-leave-federated-room"]; options?: never; head?: never; diff --git a/src/types/openapi/openapi.ts b/src/types/openapi/openapi.ts index 9ea5f5874e8..c8528722afb 100644 --- a/src/types/openapi/openapi.ts +++ b/src/types/openapi/openapi.ts @@ -289,11 +289,11 @@ export type paths = { cookie?: never; }; get?: never; - /** Update the in-call flags on the host server using the session id of the federated user. */ + /** Update the in-call flags on the host server using the session id of the federated user */ put: operations["call-update-federated-call-flags"]; - /** Join call on the host server using the session id of the federated user. */ + /** Join call on the host server using the session id of the federated user */ post: operations["call-join-federated-call"]; - /** Leave a call on the host server using the session id of the federated user. */ + /** Leave a call on the host server using the session id of the federated user */ delete: operations["call-leave-federated-call"]; options?: never; head?: never; diff --git a/vendor-bin/openapi-extractor/composer.json b/vendor-bin/openapi-extractor/composer.json index a03f8d2d50e..541de5ae993 100644 --- a/vendor-bin/openapi-extractor/composer.json +++ b/vendor-bin/openapi-extractor/composer.json @@ -5,6 +5,6 @@ } }, "require-dev": { - "nextcloud/openapi-extractor": "^1.0.1" + "nextcloud/openapi-extractor": "^1.2.2" } } diff --git a/vendor-bin/openapi-extractor/composer.lock b/vendor-bin/openapi-extractor/composer.lock index 12ca82c412a..cf75aaf5078 100644 --- a/vendor-bin/openapi-extractor/composer.lock +++ b/vendor-bin/openapi-extractor/composer.lock @@ -4,21 +4,21 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "19a2125f8a671edde7d81d5577839585", + "content-hash": "612988a594f693cb6d13615591eca81d", "packages": [], "packages-dev": [ { "name": "adhocore/cli", - "version": "v1.7.2", + "version": "v1.8.0", "source": { "type": "git", "url": "https://github.com/adhocore/php-cli.git", - "reference": "57834cbaa4fb68cda849417ab86577fba2b15298" + "reference": "6092763ab212038de64c44545574cedb7ef86269" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/adhocore/php-cli/zipball/57834cbaa4fb68cda849417ab86577fba2b15298", - "reference": "57834cbaa4fb68cda849417ab86577fba2b15298", + "url": "https://api.github.com/repos/adhocore/php-cli/zipball/6092763ab212038de64c44545574cedb7ef86269", + "reference": "6092763ab212038de64c44545574cedb7ef86269", "shasum": "" }, "require": { @@ -63,7 +63,7 @@ ], "support": { "issues": "https://github.com/adhocore/php-cli/issues", - "source": "https://github.com/adhocore/php-cli/tree/v1.7.2" + "source": "https://github.com/adhocore/php-cli/tree/v1.8.0" }, "funding": [ { @@ -75,20 +75,20 @@ "type": "github" } ], - "time": "2024-09-05T00:08:47+00:00" + "time": "2024-11-15T08:55:32+00:00" }, { "name": "nextcloud/openapi-extractor", - "version": "v1.0.1", + "version": "v1.2.2", "source": { "type": "git", "url": "https://github.com/nextcloud-releases/openapi-extractor.git", - "reference": "654c44363e1afbc6dc5e5140f22f4ac0727cbf32" + "reference": "fb177110c9d182dd9c6c5c19d20f1275f2b7f6af" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nextcloud-releases/openapi-extractor/zipball/654c44363e1afbc6dc5e5140f22f4ac0727cbf32", - "reference": "654c44363e1afbc6dc5e5140f22f4ac0727cbf32", + "url": "https://api.github.com/repos/nextcloud-releases/openapi-extractor/zipball/fb177110c9d182dd9c6c5c19d20f1275f2b7f6af", + "reference": "fb177110c9d182dd9c6c5c19d20f1275f2b7f6af", "shasum": "" }, "require": { @@ -119,9 +119,9 @@ "description": "A tool for extracting OpenAPI specifications from Nextcloud source code", "support": { "issues": "https://github.com/nextcloud-releases/openapi-extractor/issues", - "source": "https://github.com/nextcloud-releases/openapi-extractor/tree/v1.0.1" + "source": "https://github.com/nextcloud-releases/openapi-extractor/tree/v1.2.2" }, - "time": "2024-10-12T04:42:57+00:00" + "time": "2024-11-13T10:36:57+00:00" }, { "name": "nikic/php-parser",