Skip to content

Commit b118ac7

Browse files
committed
fix types
1 parent 006ed39 commit b118ac7

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

livekit-api/livekit/api/_failover.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def failover_attempts(enabled: bool, host: Optional[str], force: bool = False) -
3838
engages when enabled and the host is a LiveKit Cloud domain. ``force``
3939
bypasses the cloud-host check and is for internal testing only.
4040
"""
41-
if enabled and (force or (bool(host) and is_cloud(host))):
41+
if enabled and (force or (host is not None and is_cloud(host))):
4242
return FAILOVER_MAX_ATTEMPTS
4343
return 1
4444

livekit-api/livekit/api/access_token.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,9 +271,10 @@ def verify(self, token: str, *, verify_signature: bool = True) -> Claims:
271271

272272
if claims.get("roomPreset"):
273273
grant_claims.room_preset = claims.get("roomPreset")
274-
if claims.get("roomConfig"):
274+
room_config = claims.get("roomConfig")
275+
if room_config:
275276
grant_claims.room_config = ParseDict(
276-
claims.get("roomConfig"),
277+
room_config,
277278
RoomConfiguration(),
278279
ignore_unknown_fields=True,
279280
)

0 commit comments

Comments
 (0)