diff --git a/frontend/pages/communication/chat.vue b/frontend/pages/communication/chat.vue index 2f8f86d..24226f0 100644 --- a/frontend/pages/communication/chat.vue +++ b/frontend/pages/communication/chat.vue @@ -70,6 +70,7 @@ let matrixLiveKitRoom = null let matrixLiveSyncRunId = 0 const matrixCallVideoElements = new Map() const matrixAttachmentPreviewRequests = new Set() +const matrixAttachmentPreviewFailures = new Set() const matrixSyncSince = ref("") const canUseMatrixChat = computed(() => @@ -1388,7 +1389,12 @@ const attachmentObjectUrl = (attachment) => attachment?.url ? matrixAttachmentObjectUrls.value[attachment.url] || "" : "" const ensureAttachmentObjectUrl = async (attachment) => { - if (!attachment?.url || matrixAttachmentObjectUrls.value[attachment.url] || matrixAttachmentPreviewRequests.has(attachment.url)) return + if ( + !attachment?.url || + matrixAttachmentObjectUrls.value[attachment.url] || + matrixAttachmentPreviewRequests.has(attachment.url) || + matrixAttachmentPreviewFailures.has(attachment.url) + ) return matrixAttachmentPreviewRequests.add(attachment.url) try { @@ -1401,6 +1407,7 @@ const ensureAttachmentObjectUrl = async (attachment) => { [attachment.url]: objectUrl } } catch (error) { + matrixAttachmentPreviewFailures.add(attachment.url) // Fällt nur auf den Link zurück; der Chat selbst soll weiter funktionieren. } finally { matrixAttachmentPreviewRequests.delete(attachment.url)