[mirotalksfu] - fix direct join with password

هذا الالتزام موجود في:
Miroslav Pejic
2022-10-18 08:25:25 +02:00
الأصل de6aa514e5
التزام c72b7549b9
3 ملفات معدلة مع 30 إضافات و3 حذوفات

عرض الملف

@@ -3193,9 +3193,22 @@ class RoomClient {
switch (action) {
case 'lock':
if (room_password) {
data.password = room_password;
this.socket.emit('roomAction', data);
this.roomStatus(action);
this.socket
.request('getPeerCounts')
.then(
async function (data) {
// Only the presenter can lock the room
if (isPresenter || data.peerCounts == 1) {
isPresenter = true;
data.password = room_password;
this.socket.emit('roomAction', data);
this.roomStatus(action);
}
}.bind(this),
)
.catch((err) => {
console.log('Get peer counts:', err);
});
} else {
Swal.fire({
allowOutsideClick: false,