diff --git a/src/modules/fedimbed.js b/src/modules/fedimbed.js index 7d20d7f..fa2c11b 100644 --- a/src/modules/fedimbed.js +++ b/src/modules/fedimbed.js @@ -226,6 +226,7 @@ async function processUrl(msg, url) { attachment.pleroma?.mime_type ?? attachment.type.indexOf("/") > -1 ? attachment.type : attachment.type + + "/" + (url.match(/\.([a-z0-9]{3,4})$/)?.[0] ?? attachment.type == "image" ? "png" @@ -469,6 +470,7 @@ async function processUrl(msg, url) { attachment.type.indexOf("/") > -1 ? attachment.type.replace("/", ".") : attachment.type + + "." + (url.match(/\.([a-z0-9]{3,4})$/)?.[0] ?? "mp4"), contents: file, }); @@ -504,6 +506,7 @@ async function processUrl(msg, url) { .replace("vnd.wave", "wav") .replace("x-wav", "wav") : attachment.type + + "." + (url.match(/\.([a-z0-9]{3,4})$/)?.[0] ?? "mp3"), contents: file, });