Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Comments

Close side panel

expose participant permissions#568

Merged
theomonnom merged 4 commits intomainlivekit/python-sdks:mainfrom
theo/permissionslivekit/python-sdks:theo/permissionsCopy head branch name to clipboard
Feb 9, 2026
Merged

expose participant permissions#568
theomonnom merged 4 commits intomainlivekit/python-sdks:mainfrom
theo/permissionslivekit/python-sdks:theo/permissionsCopy head branch name to clipboard

Conversation

@theomonnom
Copy link
Member

@theomonnom theomonnom commented Feb 8, 2026

depends on #568 (comment)

Copy link
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 3 additional findings.

Open in Devin Review

@theomonnom theomonnom merged commit 2744c66 into main Feb 9, 2026
12 checks passed
@theomonnom theomonnom deleted the theo/permissions branch February 9, 2026 03:19
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 new potential issue.

View 4 additional findings in Devin Review.

Open in Devin Review

participant,
event.participant_encryption_status_changed.is_encrypted,
)
elif which == "participant_permissions_changed":
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Mismatched protobuf oneof field name causes permission change events to be silently dropped

The elif branch at line 791 checks which == "participant_permissions_changed" (plural, with 's'), but the protobuf WhichOneof("message") returns "participant_permission_changed" (singular, no 's'). This means the branch never matches and permission change events are silently ignored.

Root Cause

In livekit-rtc/livekit/rtc/room.py:640-641, which is set via event.WhichOneof("message"). According to the protobuf definition in livekit-rtc/livekit/rtc/_proto/room_pb2.pyi:1468, the valid oneof values include "participant_permission_changed" (singular). However, line 791 compares against "participant_permissions_changed" (plural with 's'):

elif which == "participant_permissions_changed":  # WRONG: extra 's'
    identity = event.participant_permission_changed.participant_identity  # correct field access

Note that the field access on line 792 (event.participant_permission_changed) correctly uses the singular form, confirming this is a typo in the which == comparison only.

Impact: The participant_permissions_changed event will never be emitted to listeners, and participant._info.permission will never be updated when permissions change. Users subscribing to "participant_permissions_changed" events will never receive callbacks, and participant.permissions will return stale data.

Suggested change
elif which == "participant_permissions_changed":
elif which == "participant_permission_changed":
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.