diff --git a/TEMPLATE.md b/TEMPLATE.md index c1a07c3..26a7460 100644 --- a/TEMPLATE.md +++ b/TEMPLATE.md @@ -37,8 +37,12 @@ async function createToken({ roomName, participantName }) { identity: participantName, ttl: '10m', }); - at.addGrant({ roomJoin: true, room: roomName }); - return await at.toJwt(); + at.addGrant({ + roomJoin: true, + room: roomName, + canUpdateOwnMetadata: true, + }); + return at.toJwt(); } const app = express(); diff --git a/package.json b/package.json index fe1dada..6532607 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "dependencies": { "dotenv": "^16.4.5", "express": "^4.21.1", - "livekit-server-sdk": "^2.7.2" + "livekit-server-sdk": "^2.8.1" }, "devDependencies": { "@eslint/eslintrc": "^3.1.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 820a812..a42a166 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -15,7 +15,7 @@ importers: specifier: ^4.21.1 version: 4.21.1 livekit-server-sdk: - specifier: ^2.7.2 + specifier: ^2.8.1 version: 2.8.1 devDependencies: '@eslint/eslintrc': diff --git a/src/main.ts b/src/main.ts index c1f3c72..f080fef 100644 --- a/src/main.ts +++ b/src/main.ts @@ -19,8 +19,12 @@ async function createToken({ roomName, participantName }: TokenRequest) { }); // Token permissions can be added here based on the // desired capabilities of the participant - at.addGrant({ roomJoin: true, room: roomName }); - return await at.toJwt(); + at.addGrant({ + roomJoin: true, + room: roomName, + canUpdateOwnMetadata: true, + }); + return at.toJwt(); } const app = express();