diff --git a/lib/Controller/FederationController.php b/lib/Controller/FederationController.php index 5cc0ef4410c6..2a8072672a48 100644 --- a/lib/Controller/FederationController.php +++ b/lib/Controller/FederationController.php @@ -180,7 +180,6 @@ public function getShares(): DataResponse { * @return TalkFederationInvite|null */ protected function enrichInvite(Invitation $invitation): ?array { - try { $room = $this->talkManager->getRoomById($invitation->getLocalRoomId()); } catch (RoomNotFoundException) { @@ -189,6 +188,7 @@ protected function enrichInvite(Invitation $invitation): ?array { $federationInvite = $invitation->jsonSerialize(); $federationInvite['roomName'] = $room->getName(); + $federationInvite['localToken'] = $room->getToken(); return $federationInvite; } } diff --git a/lib/Model/Invitation.php b/lib/Model/Invitation.php index f0c7377db9a3..558fbb0104dd 100644 --- a/lib/Model/Invitation.php +++ b/lib/Model/Invitation.php @@ -79,14 +79,13 @@ public function __construct() { } /** - * @return array{id: int, localRoomId: int, localCloudId: string, remoteAttendeeId: int, remoteServerUrl: string, remoteToken: string, state: int, userId: string, inviterCloudId: string, inviterDisplayName: string} + * @return array{id: int, localCloudId: string, remoteAttendeeId: int, remoteServerUrl: string, remoteToken: string, state: int, userId: string, inviterCloudId: string, inviterDisplayName: string} */ public function jsonSerialize(): array { return [ 'id' => $this->getId(), 'userId' => $this->getUserId(), 'state' => $this->getState(), - 'localRoomId' => $this->getLocalRoomId(), 'localCloudId' => $this->getLocalCloudId(), 'remoteServerUrl' => $this->getRemoteServerUrl(), 'remoteToken' => $this->getRemoteToken(), diff --git a/lib/ResponseDefinitions.php b/lib/ResponseDefinitions.php index 1ddcbacccbd7..4189222dad31 100644 --- a/lib/ResponseDefinitions.php +++ b/lib/ResponseDefinitions.php @@ -117,7 +117,7 @@ * id: int, * state: int, * localCloudId: string, - * localRoomId: int, + * localToken: string, * remoteAttendeeId: int, * remoteServerUrl: string, * remoteToken: string, diff --git a/openapi-federation.json b/openapi-federation.json index 94d773b18c15..e71a6f6da543 100644 --- a/openapi-federation.json +++ b/openapi-federation.json @@ -316,7 +316,7 @@ "id", "state", "localCloudId", - "localRoomId", + "localToken", "remoteAttendeeId", "remoteServerUrl", "remoteToken", @@ -337,9 +337,8 @@ "localCloudId": { "type": "string" }, - "localRoomId": { - "type": "integer", - "format": "int64" + "localToken": { + "type": "string" }, "remoteAttendeeId": { "type": "integer", diff --git a/openapi-full.json b/openapi-full.json index fa1e3f6e14cf..50e739aad5fd 100644 --- a/openapi-full.json +++ b/openapi-full.json @@ -517,7 +517,7 @@ "id", "state", "localCloudId", - "localRoomId", + "localToken", "remoteAttendeeId", "remoteServerUrl", "remoteToken", @@ -538,9 +538,8 @@ "localCloudId": { "type": "string" }, - "localRoomId": { - "type": "integer", - "format": "int64" + "localToken": { + "type": "string" }, "remoteAttendeeId": { "type": "integer", diff --git a/src/types/openapi/openapi-federation.ts b/src/types/openapi/openapi-federation.ts index 1988ac0d983f..a4893fc9401e 100644 --- a/src/types/openapi/openapi-federation.ts +++ b/src/types/openapi/openapi-federation.ts @@ -137,8 +137,7 @@ export type components = { /** Format: int64 */ state: number; localCloudId: string; - /** Format: int64 */ - localRoomId: number; + localToken: string; /** Format: int64 */ remoteAttendeeId: number; remoteServerUrl: string; diff --git a/src/types/openapi/openapi-full.ts b/src/types/openapi/openapi-full.ts index 71be708bb1a4..98121ac63493 100644 --- a/src/types/openapi/openapi-full.ts +++ b/src/types/openapi/openapi-full.ts @@ -664,8 +664,7 @@ export type components = { /** Format: int64 */ state: number; localCloudId: string; - /** Format: int64 */ - localRoomId: number; + localToken: string; /** Format: int64 */ remoteAttendeeId: number; remoteServerUrl: string;