Update chat_window.php
This commit is contained in:
+5
-2
@@ -635,10 +635,13 @@ if (empty($user_id)) {
|
||||
if (isMultimedia) {
|
||||
console.log('→ Renderizando como multimedia:', msg.message_type);
|
||||
// Mensaje multimedia
|
||||
// Declarar variables de media aquí para evitar TDZ (referencias en otros `case`)
|
||||
let thumbUrl = '';
|
||||
let fullUrl = '';
|
||||
switch (msg.message_type) {
|
||||
case 'image':
|
||||
// Determinar miniatura y URL completa (prioriza media_url_external o archivos locales)
|
||||
let thumbUrl = '';
|
||||
thumbUrl = '';
|
||||
if (isValidMediaUrl(msg.local_thumb)) {
|
||||
thumbUrl = `/${msg.local_thumb}`;
|
||||
} else if (isValidMediaUrl(msg.local_file)) {
|
||||
@@ -661,7 +664,7 @@ if (empty($user_id)) {
|
||||
thumbUrl = msg.media_url;
|
||||
}
|
||||
|
||||
let fullUrl = '';
|
||||
fullUrl = '';
|
||||
if (isValidMediaUrl(msg.local_file)) {
|
||||
fullUrl = `/api/version/media-url.php?local=${encodeURIComponent(msg.local_file)}`;
|
||||
} else if (isValidMediaUrl(msg.media_url_external)) {
|
||||
|
||||
Reference in New Issue
Block a user