Give JWT token fetch procedures more appropriate names

This commit is contained in:
Robin
2026-09-08 21:22:52 +02:00
parent 839e36abd4
commit 09782a4d84
+5 -5
View File
@@ -126,9 +126,9 @@ export async function getSFUConfigWithOpenID(
if (tryBothJwtEndpoints || forceMatrix2Jwt) { if (tryBothJwtEndpoints || forceMatrix2Jwt) {
try { try {
logger?.info( logger?.info(
`Trying to get JWT with delegation for focus ${serviceUrl}...`, `Trying to get JWT via default endpoint for focus ${serviceUrl}...`,
); );
const sfuConfig = await getLiveKitJWTWithDelayDelegation( const sfuConfig = await getLiveKitJWT(
membership, membership,
serviceUrl, serviceUrl,
roomId, roomId,
@@ -154,7 +154,7 @@ export async function getSFUConfigWithOpenID(
logger?.info( logger?.info(
`Trying to get JWT with legacy endpoint for focus ${serviceUrl}...`, `Trying to get JWT with legacy endpoint for focus ${serviceUrl}...`,
); );
sfuConfig = await getLiveKitJWT( sfuConfig = await getLiveKitJWTLegacy(
membership.deviceId, membership.deviceId,
serviceUrl, serviceUrl,
roomId, roomId,
@@ -188,7 +188,7 @@ function extractFullConfigFromToken(sfuConfig: {
}; };
} }
async function getLiveKitJWT( async function getLiveKitJWTLegacy(
deviceId: string, deviceId: string,
livekitServiceURL: string, livekitServiceURL: string,
matrixRoomId: string, matrixRoomId: string,
@@ -263,7 +263,7 @@ class NotSupportedError extends Error {
} }
} }
export async function getLiveKitJWTWithDelayDelegation( export async function getLiveKitJWT(
membership: CallMembershipIdentityParts, membership: CallMembershipIdentityParts,
livekitServiceURL: string, livekitServiceURL: string,
matrixRoomId: string, matrixRoomId: string,