Skip to content

Conversation

@TamaraFinogina
Copy link
Collaborator

@TamaraFinogina TamaraFinogina commented Feb 10, 2026

Description

Chat key is shared by the "oldest" user in the meeting instead of the moderator.
This change allows for preventing errors when a moderator is assigned with a delay (due to a server being slow), or all users reconnect simultaneously.

How it was tested:

QA done with this PR: internxt/meet-web#183

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@TamaraFinogina TamaraFinogina self-assigned this Feb 10, 2026
);

if (list.length === 0) return false;
const firstParticipant = list[0].getId();
Copy link

Choose a reason for hiding this comment

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

is the list ordered?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

hmm, should be, but I add sorting just in case

const firstParticipant = list[0].getId();

return !participants.some(p => p.isModerator());
return firstParticipant == pId;
Copy link

Choose a reason for hiding this comment

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

Always use strict equality (===) instead of loose equality (==)

@TamaraFinogina TamaraFinogina changed the base branch from master to new_version February 10, 2026 16:44
@TamaraFinogina TamaraFinogina merged commit 7820ba8 into new_version Feb 10, 2026
3 checks passed
@TamaraFinogina TamaraFinogina deleted the remove_moderator branch February 10, 2026 16:47
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