KI-AGENT: Fehlende Matrix Medienvorschauen nicht wiederholt laden
This commit is contained in:
@@ -70,6 +70,7 @@ let matrixLiveKitRoom = null
|
|||||||
let matrixLiveSyncRunId = 0
|
let matrixLiveSyncRunId = 0
|
||||||
const matrixCallVideoElements = new Map()
|
const matrixCallVideoElements = new Map()
|
||||||
const matrixAttachmentPreviewRequests = new Set()
|
const matrixAttachmentPreviewRequests = new Set()
|
||||||
|
const matrixAttachmentPreviewFailures = new Set()
|
||||||
const matrixSyncSince = ref("")
|
const matrixSyncSince = ref("")
|
||||||
|
|
||||||
const canUseMatrixChat = computed(() =>
|
const canUseMatrixChat = computed(() =>
|
||||||
@@ -1388,7 +1389,12 @@ const attachmentObjectUrl = (attachment) =>
|
|||||||
attachment?.url ? matrixAttachmentObjectUrls.value[attachment.url] || "" : ""
|
attachment?.url ? matrixAttachmentObjectUrls.value[attachment.url] || "" : ""
|
||||||
|
|
||||||
const ensureAttachmentObjectUrl = async (attachment) => {
|
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)
|
matrixAttachmentPreviewRequests.add(attachment.url)
|
||||||
try {
|
try {
|
||||||
@@ -1401,6 +1407,7 @@ const ensureAttachmentObjectUrl = async (attachment) => {
|
|||||||
[attachment.url]: objectUrl
|
[attachment.url]: objectUrl
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
matrixAttachmentPreviewFailures.add(attachment.url)
|
||||||
// Fällt nur auf den Link zurück; der Chat selbst soll weiter funktionieren.
|
// Fällt nur auf den Link zurück; der Chat selbst soll weiter funktionieren.
|
||||||
} finally {
|
} finally {
|
||||||
matrixAttachmentPreviewRequests.delete(attachment.url)
|
matrixAttachmentPreviewRequests.delete(attachment.url)
|
||||||
|
|||||||
Reference in New Issue
Block a user