fix: guest join doesn't add avatar when logged in
All checks were successful
Build & Push Docker Image / build (push) Successful in 4m27s
All checks were successful
Build & Push Docker Image / build (push) Successful in 4m27s
This commit is contained in:
@@ -30,11 +30,17 @@ export default function GuestJoin() {
|
||||
const joinMeeting = async () => {
|
||||
setJoining(true);
|
||||
try {
|
||||
const res = await api.post(`/rooms/${uid}/guest-join`, {
|
||||
const payload = {
|
||||
name: name.trim(),
|
||||
access_code: accessCode || undefined,
|
||||
moderator_code: moderatorCode || undefined,
|
||||
});
|
||||
};
|
||||
// If logged in, send avatar data
|
||||
if (isLoggedIn && user) {
|
||||
if (user.avatar_image) payload.avatar_image = user.avatar_image;
|
||||
if (user.avatar_color) payload.avatar_color = user.avatar_color;
|
||||
}
|
||||
const res = await api.post(`/rooms/${uid}/guest-join`, payload);
|
||||
if (res.data.joinUrl) {
|
||||
window.location.href = res.data.joinUrl;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user