Skip to content

Commit 867fc30

Browse files
authored
Work around a Jitsi bug with display name encoding (#22525)
1 parent 0fd1bc7 commit 867fc30

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/vector/jitsi/index.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -394,6 +394,16 @@ function joinConference(audioDevice?: string, videoDevice?: string) {
394394
// fires once when user joins the conference
395395
// (regardless of video on or off)
396396
meetApi.on("videoConferenceJoined", () => {
397+
// Although we set our displayName with the userInfo option above, that
398+
// option has a bug where it causes the name to be the HTML encoding of
399+
// what was actually intended. So, we use the displayName command to at
400+
// least ensure that the name is correct after entering the meeting.
401+
// https://github.com/jitsi/jitsi-meet/issues/11664
402+
// We can't just use these commands immediately after creating the
403+
// iframe, because there's *another* bug where they can crash Jitsi by
404+
// racing with its startup process.
405+
if (displayName) meetApi.executeCommand("displayName", displayName);
406+
// This doesn't have a userInfo equivalent, so has to be set via commands
397407
if (avatarUrl) meetApi.executeCommand("avatarUrl", avatarUrl);
398408

399409
if (widgetApi) {

0 commit comments

Comments
 (0)