From 7061aa1e5e20cadc8b1388aa4053a33029da884d Mon Sep 17 00:00:00 2001 From: Raven Scott Date: Thu, 13 Jun 2024 22:41:43 -0400 Subject: [PATCH] fixes --- app.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app.js b/app.js index fd4f82b..0d3eb91 100644 --- a/app.js +++ b/app.js @@ -539,7 +539,7 @@ function addFileMessage(from, fileName, fileUrl, fileType, avatar, topic) { $div.classList.add('message'); const $img = document.createElement('img'); - $img.src = avatar || 'https://via.placeholder.com/40'; + $img.src = updatePortInUrl(avatar) || 'https://via.placeholder.com/40'; $img.classList.add('avatar'); $div.appendChild($img); @@ -553,7 +553,7 @@ function addFileMessage(from, fileName, fileUrl, fileType, avatar, topic) { if (fileType.startsWith('image/')) { const $image = document.createElement('img'); - $image.src = fileUrl; + $image.src = updatePortInUrl(fileUrl); $image.alt = fileName; $image.classList.add('attached-image'); $content.appendChild($image); @@ -664,7 +664,7 @@ function addAudioMessage(from, audioUrl, avatar, topic) { if (from !== config.userName) { $audio.autoplay = true; // Add autoplay attribute for peers only } - $audio.src = audioUrl; + $audio.src = updatePortInUrl(audioUrl); $audio.classList.add('attached-audio'); $content.appendChild($audio);