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