Skip to content

Commit 14f8379

Browse files
[FIX] "Click to Join" button is not working if there are no muted users in the room (#22871)
* Fix room.muted undefined error * Remove unnecessary includes function calls Co-authored-by: Tasso Evangelista <[email protected]>
1 parent 4b23ca5 commit 14f8379

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

app/authorization/server/functions/canSendMessage.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export const validateRoomMessagePermissionsAsync = async (room, { uid, username,
3333
}
3434
}
3535

36-
if ((room.muted || []).includes(username)) {
36+
if (room?.muted?.includes(username)) {
3737
throw new Error('You_have_been_muted');
3838
}
3939
};

app/lib/server/lib/processDirectEmail.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ export const processDirectEmail = function(email) {
8787
return false;
8888
}
8989

90-
if ((room.muted || []).includes(user.username)) {
90+
if (room?.muted?.includes(user.username)) {
9191
// user is muted
9292
return false;
9393
}

app/videobridge/client/actionLink.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ actionLinks.register('joinJitsiCall', function(message, params, instance) {
1515
const currentTime = new Date().getTime();
1616
const jitsiTimeout = new Date((room && room.jitsiTimeout) || currentTime).getTime();
1717

18-
if (room && room.muted.includes(username)) {
18+
if (room && room?.muted?.includes(username)) {
1919
toastr.error(TAPi18n.__('You_have_been_muted', ''));
2020
} else if (jitsiTimeout > currentTime) {
2121
instance.tabBar.open('video');

0 commit comments

Comments
 (0)