diff --git a/zooid/livekit.go b/zooid/livekit.go index 2c5bd95..73edb10 100644 --- a/zooid/livekit.go +++ b/zooid/livekit.go @@ -24,11 +24,15 @@ type TokenEndpointResponse struct { } func generateLivekitToken(apiKey, apiSecret, room string, pubkey nostr.PubKey) string { - at := auth.NewAccessToken(apiKey, apiSecret) - at.SetVideoGrant(&auth.VideoGrant{ + grant := &auth.VideoGrant{ RoomJoin: true, Room: room, - }) + } + grant.SetCanPublish(true) + grant.SetCanSubscribe(true) + + at := auth.NewAccessToken(apiKey, apiSecret) + at.SetVideoGrant(grant) at.SetIdentity(pubkey.Hex()) jwt, _ := at.ToJWT()