1
0
Fork 0

d->m: Alt text should be bridged for any file type

This commit is contained in:
Cadence Ember 2024-01-06 19:10:52 +13:00
parent 83070dcf7e
commit 60cf40680f

View file

@ -127,7 +127,7 @@ async function attachmentToEvent(mentions, attachment) {
msgtype: "m.image", msgtype: "m.image",
url: await file.uploadDiscordFileToMxc(attachment.url), url: await file.uploadDiscordFileToMxc(attachment.url),
external_url: attachment.url, external_url: attachment.url,
body: attachment.filename, body: attachment.description || attachment.filename,
filename: attachment.filename, filename: attachment.filename,
info: { info: {
mimetype: attachment.content_type, mimetype: attachment.content_type,
@ -174,7 +174,7 @@ async function attachmentToEvent(mentions, attachment) {
msgtype: "m.file", msgtype: "m.file",
url: await file.uploadDiscordFileToMxc(attachment.url), url: await file.uploadDiscordFileToMxc(attachment.url),
external_url: attachment.url, external_url: attachment.url,
body: attachment.filename, body: attachment.description || attachment.filename,
filename: attachment.filename, filename: attachment.filename,
info: { info: {
mimetype: attachment.content_type, mimetype: attachment.content_type,