Repository navigation
feat(events): add support for user-role-changed - #79
Merged
Merged
Conversation
prlanzarin
self-requested a review
October 6, 2026 18:11
AtilaU19
self-requested a review
October 20, 2026 16:51
AtilaU19
approved these changes
Oct 20, 2026
prlanzarin
requested changes
Oct 28, 2026
Role changes in a meeting are not reported to hooks: UserRoleChangedEvtMsg is not mapped, so integrations cannot tell when a user is promoted to moderator or demoted to viewer. Map it to a user-role-changed event carrying the new role and the requester under changed-by. Unlike other user messages, its header.userId is the requester rather than the affected user, so list it in BODY_USER_ID_EVENTS and have _extractIntUserID read only body.userId for it; falling back to the header would attribute the change to the moderator who made it. Also update the role stored in the user mapping, so the user-left events spoofed when a meeting ends report the current role instead of the one the user joined with.
prlanzarin
approved these changes
Oct 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Role changes in a meeting are not reported to hooks: UserRoleChangedEvtMsg is not mapped, so integrations cannot tell when a user is promoted to moderator or demoted to viewer.
Map it to a user-role-changed event carrying the new role and the requester under changed-by. Unlike other user messages, its header.userId is the requester rather than the affected user, so list it in BODY_USER_ID_EVENTS and have _extractIntUserID read only body.userId for it; falling back to the header would attribute the change to the moderator who made it.
Also update the role stored in the user mapping, so the user-left events spoofed when a meeting ends report the current role instead of the one the user joined with.
Closes #78