# livekit_api: Fix LiveKit token revocation timestamps \(\#60157\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/59185f5a70b4ed7015de301db494b6e1032e9a09)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 59185f5a70b4ed7015de301db494b6e1032e9a09

Requested commit: 59185f5a70b4ed7015de301db494b6e1032e9a09

Commit: 59185f5a70b4ed7015de301db494b6e1032e9a09

Tree: e4afd7337f343b197cf31258899a7530f3fa6d62

Author: Richard Feldman

Committer: GitHub

## Message

```
livekit_api: Fix LiveKit token revocation timestamps (#60157)

LiveKit Cloud rejects room-join tokens as revoked when their `nbf`
predates a participant revocation. Zed generated those LiveKit JWTs with
`nbf: 0`, so a fresh participant token minted after stale connection
cleanup could still appear older than the cleanup and leave a user
joined at the collab layer without audio or screen sharing. This sets
`nbf` to the issuance time for room-join tokens while leaving admin/API
tokens unchanged, and adds regression coverage at the token, mock
LiveKit, and channel rejoin layers.

Closes FR-83

Release Notes:

- Fixed calls getting stuck without audio or screen sharing after
restarting Zed and rejoining a channel.
```

## Parents

- [98ddc3ae2efef817d71f40f8ead59b87e5407d68](https://git.cafe/gitcafe/zed/commit/98ddc3ae2efef817d71f40f8ead59b87e5407d68?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/59185f5a70b4ed7015de301db494b6e1032e9a09?format=markdown)
