[mirotalksfu] - fix login

هذا الالتزام موجود في:
Miroslav Pejic
2025-08-17 09:04:29 +02:00
الأصل 33f68be2fa
التزام dd3dae1c32
6 ملفات معدلة مع 45 إضافات و15 حذوفات

عرض الملف

@@ -110,7 +110,7 @@ let BRAND = {
},
about: {
imageUrl: '../images/mirotalk-logo.gif',
title: '<strong>WebRTC SFU v1.9.38</strong>',
title: '<strong>WebRTC SFU v1.9.39</strong>',
html: `
<button
id="support-button"

عرض الملف

@@ -59,7 +59,7 @@ function login() {
const token = response.data.message;
window.sessionStorage.peer_token = token;
// Allowed rooms
// User (has access to some room)
const allowedRooms = response.data.allowedRooms;
if (allowedRooms && !allowedRooms.includes('*')) {
console.log('User detected with limited join room access!', allowedRooms);
@@ -74,16 +74,46 @@ function login() {
return;
}
if (room) {
return (window.location.href = '/join/' + window.location.search);
// return (window.location.href = '/join/?room=' + room + '&token=' + token);
}
if (roomPath && roomPath !== 'login') {
return (window.location.href = '/join/' + roomPath);
// return (window.location.href ='/join/?room=' + roomPath + '&token=' + token);
// Admin (has access to all rooms)
if (allowedRooms && allowedRooms.includes('*')) {
loginForm.style.display = 'none';
joinRoomForm.style.display = 'block';
selectRoom.innerHTML = '';
const input = document.createElement('input');
input.type = 'text';
input.id = 'customRoomInput';
input.placeholder = 'Enter room name';
input.className = 'form-control mb-2';
selectRoom.parentNode.insertBefore(input, selectRoom);
selectRoom.style.display = 'none';
joinSelectRoomBtn.onclick = () => {
const roomName = filterXSS(document.getElementById('customRoomInput').value);
if (roomName) {
window.location.href =
'/join/?room=' +
roomName +
'&name=' +
username +
'&token=' +
window.sessionStorage.peer_token;
} else {
popup('warning', 'Room name required');
}
};
return;
}
return (window.location.href = '/logged');
if (room) {
window.location.href = '/join/' + window.location.search;
return;
}
if (roomPath && roomPath !== 'login') {
window.location.href = '/join/' + roomPath;
return;
}
window.location.href = '/logged';
return;
})
.catch(function (error) {
console.error(error);

عرض الملف

@@ -11,7 +11,7 @@ if (location.href.substr(0, 5) !== 'https') location.href = 'https' + location.h
* @license For commercial or closed source, contact us at license.mirotalk@gmail.com or purchase directly via CodeCanyon
* @license CodeCanyon: https://codecanyon.net/item/mirotalk-sfu-webrtc-realtime-video-conferences/40769970
* @author Miroslav Pejic - miroslav.pejic.85@gmail.com
* @version 1.9.38
* @version 1.9.39
*
*/
@@ -5543,7 +5543,7 @@ function showAbout() {
position: 'center',
imageUrl: BRAND.about?.imageUrl && BRAND.about.imageUrl.trim() !== '' ? BRAND.about.imageUrl : image.about,
customClass: { image: 'img-about' },
title: BRAND.about?.title && BRAND.about.title.trim() !== '' ? BRAND.about.title : 'WebRTC SFU v1.9.38',
title: BRAND.about?.title && BRAND.about.title.trim() !== '' ? BRAND.about.title : 'WebRTC SFU v1.9.39',
html: `
<br />
<div id="about">

عرض الملف

@@ -9,7 +9,7 @@
* @license For commercial or closed source, contact us at license.mirotalk@gmail.com or purchase directly via CodeCanyon
* @license CodeCanyon: https://codecanyon.net/item/mirotalk-sfu-webrtc-realtime-video-conferences/40769970
* @author Miroslav Pejic - miroslav.pejic.85@gmail.com
* @version 1.9.38
* @version 1.9.39
*
*/