joinUrl -> loginURL
All checks were successful
Build & Push Docker Image / build (push) Successful in 1m9s
All checks were successful
Build & Push Docker Image / build (push) Successful in 1m9s
This commit is contained in:
@@ -77,7 +77,7 @@ export async function createMeeting(room, logoutURL) {
|
|||||||
return apiCall('create', params);
|
return apiCall('create', params);
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function joinMeeting(uid, name, isModerator = false, avatarURL = null, joinUrl = null) {
|
export async function joinMeeting(uid, name, isModerator = false, avatarURL = null, loginURL = null) {
|
||||||
const { moderatorPW, attendeePW } = getRoomPasswords(uid);
|
const { moderatorPW, attendeePW } = getRoomPasswords(uid);
|
||||||
const params = {
|
const params = {
|
||||||
meetingID: uid,
|
meetingID: uid,
|
||||||
@@ -88,8 +88,8 @@ export async function joinMeeting(uid, name, isModerator = false, avatarURL = nu
|
|||||||
if (avatarURL) {
|
if (avatarURL) {
|
||||||
params.avatarURL = avatarURL;
|
params.avatarURL = avatarURL;
|
||||||
}
|
}
|
||||||
if (joinUrl) {
|
if (loginURL) {
|
||||||
params.joinUrl = joinUrl;
|
params.loginURL = loginURL;
|
||||||
}
|
}
|
||||||
return buildUrl('join', params);
|
return buildUrl('join', params);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -343,8 +343,8 @@ router.post('/:uid/start', authenticateToken, async (req, res) => {
|
|||||||
|
|
||||||
await createMeeting(room, `${req.protocol}://${req.get('host')}`);
|
await createMeeting(room, `${req.protocol}://${req.get('host')}`);
|
||||||
const avatarURL = getUserAvatarURL(req, req.user);
|
const avatarURL = getUserAvatarURL(req, req.user);
|
||||||
const appJoinUrl = `${req.protocol}://${req.get('host')}/join/${room.uid}`;
|
const appLoginUrl = `${req.protocol}://${req.get('host')}/join/${room.uid}`;
|
||||||
const joinUrl = await joinMeeting(room.uid, req.user.name, true, avatarURL, appJoinUrl);
|
const joinUrl = await joinMeeting(room.uid, req.user.name, true, avatarURL, appLoginUrl);
|
||||||
res.json({ joinUrl });
|
res.json({ joinUrl });
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error('Start meeting error:', err);
|
console.error('Start meeting error:', err);
|
||||||
@@ -378,8 +378,8 @@ router.post('/:uid/join', authenticateToken, async (req, res) => {
|
|||||||
const isShared = !isOwner && await db.get('SELECT id FROM room_shares WHERE room_id = ? AND user_id = ?', [room.id, req.user.id]);
|
const isShared = !isOwner && await db.get('SELECT id FROM room_shares WHERE room_id = ? AND user_id = ?', [room.id, req.user.id]);
|
||||||
const isModerator = isOwner || !!isShared || room.all_join_moderator;
|
const isModerator = isOwner || !!isShared || room.all_join_moderator;
|
||||||
const avatarURL = getUserAvatarURL(req, req.user);
|
const avatarURL = getUserAvatarURL(req, req.user);
|
||||||
const appJoinUrl = `${req.protocol}://${req.get('host')}/join/${room.uid}`;
|
const appLoginUrl = `${req.protocol}://${req.get('host')}/join/${room.uid}`;
|
||||||
const joinUrl = await joinMeeting(room.uid, req.user.name, isModerator, avatarURL, appJoinUrl);
|
const joinUrl = await joinMeeting(room.uid, req.user.name, isModerator, avatarURL, appLoginUrl);
|
||||||
res.json({ joinUrl });
|
res.json({ joinUrl });
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error('Join meeting error:', err);
|
console.error('Join meeting error:', err);
|
||||||
@@ -488,8 +488,8 @@ router.post('/:uid/guest-join', async (req, res) => {
|
|||||||
|
|
||||||
const baseUrl = `${req.protocol}://${req.get('host')}`;
|
const baseUrl = `${req.protocol}://${req.get('host')}`;
|
||||||
const guestAvatarURL = `${baseUrl}/api/auth/avatar/initials/${encodeURIComponent(name.trim())}`;
|
const guestAvatarURL = `${baseUrl}/api/auth/avatar/initials/${encodeURIComponent(name.trim())}`;
|
||||||
const appJoinUrl = `${baseUrl}/join/${room.uid}`;
|
const appLoginUrl = `${baseUrl}/join/${room.uid}`;
|
||||||
const joinUrl = await joinMeeting(room.uid, name.trim(), isModerator, guestAvatarURL, appJoinUrl);
|
const joinUrl = await joinMeeting(room.uid, name.trim(), isModerator, guestAvatarURL, appLoginUrl);
|
||||||
res.json({ joinUrl });
|
res.json({ joinUrl });
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error('Guest join error:', err);
|
console.error('Guest join error:', err);
|
||||||
|
|||||||
Reference in New Issue
Block a user