KI-AGENT: Fehlende Matrix Medienvorschauen nicht wiederholt laden
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user