From 083f7bd9ba38c7e79daf607f5541f0e5d8041e26 Mon Sep 17 00:00:00 2001 From: Cadence Ember Date: Sat, 25 Nov 2023 22:08:29 +1300 Subject: [PATCH] Make text spoilers work on Android --- d2m/converters/message-to-event.js | 2 +- d2m/converters/message-to-event.test.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/d2m/converters/message-to-event.js b/d2m/converters/message-to-event.js index 24c7f2d..92bc241 100644 --- a/d2m/converters/message-to-event.js +++ b/d2m/converters/message-to-event.js @@ -107,7 +107,7 @@ async function attachmentToEvent(mentions, attachment) { msgtype: "m.text", body: `${emoji} Uploaded SPOILER file: ${attachment.url} (${pb(attachment.size)})`, format: "org.matrix.custom.html", - formatted_body: `
${emoji} Uploaded SPOILER file: ${attachment.url} (${pb(attachment.size)})
` + formatted_body: `
${emoji} Uploaded SPOILER file: ${attachment.url} (${pb(attachment.size)})
` } } // for large files, always link them instead of uploading so I don't use up all the space in the content repo diff --git a/d2m/converters/message-to-event.test.js b/d2m/converters/message-to-event.test.js index f3ac895..9c28f0b 100644 --- a/d2m/converters/message-to-event.test.js +++ b/d2m/converters/message-to-event.test.js @@ -176,7 +176,7 @@ test("message2event: spoiler attachment", async t => { msgtype: "m.text", body: "📄 Uploaded SPOILER file: https://cdn.discordapp.com/attachments/1100319550446252084/1147465564307079258/SPOILER_69-GNDP-CADENCE.nfs.gci (74 KB)", format: "org.matrix.custom.html", - formatted_body: "
📄 Uploaded SPOILER file: View (74 KB)
" + formatted_body: "
📄 Uploaded SPOILER file: https://cdn.discordapp.com/attachments/1100319550446252084/1147465564307079258/SPOILER_69-GNDP-CADENCE.nfs.gci (74 KB)
" }]) })