diff options
author | Joas Schilling <coding@schilljs.com> | 2024-03-12 10:24:41 +0100 |
---|---|---|
committer | Maksim Sukharev <antreesy.web@gmail.com> | 2024-03-12 10:46:13 +0100 |
commit | f65db249631ecb4c8f9fb2fd86e831fd711340e7 (patch) | |
tree | 936cfdaa8704c1415e11f1a3853e68fe2206eae6 /lib | |
parent | 03ae3d3237af984b74b9ca8ac1bcde9e0072690e (diff) |
fix(federation): Expose local token with the invite so UI can render the avatar
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Controller/FederationController.php | 2 | ||||
-rw-r--r-- | lib/Model/Invitation.php | 3 | ||||
-rw-r--r-- | lib/ResponseDefinitions.php | 2 |
3 files changed, 3 insertions, 4 deletions
diff --git a/lib/Controller/FederationController.php b/lib/Controller/FederationController.php index 5cc0ef441..2a8072672 100644 --- a/lib/Controller/FederationController.php +++ b/lib/Controller/FederationController.php @@ -180,7 +180,6 @@ class FederationController extends OCSController { * @return TalkFederationInvite|null */ protected function enrichInvite(Invitation $invitation): ?array { - try { $room = $this->talkManager->getRoomById($invitation->getLocalRoomId()); } catch (RoomNotFoundException) { @@ -189,6 +188,7 @@ class FederationController extends OCSController { $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 f0c7377db..558fbb010 100644 --- a/lib/Model/Invitation.php +++ b/lib/Model/Invitation.php @@ -79,14 +79,13 @@ class Invitation extends Entity implements \JsonSerializable { } /** - * @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 1ddcbaccc..4189222da 100644 --- a/lib/ResponseDefinitions.php +++ b/lib/ResponseDefinitions.php @@ -117,7 +117,7 @@ namespace OCA\Talk; * id: int, * state: int, * localCloudId: string, - * localRoomId: int, + * localToken: string, * remoteAttendeeId: int, * remoteServerUrl: string, * remoteToken: string, |