fedimbed: forgot separator

This commit is contained in:
Cynthia Foxwell 2023-01-06 11:23:22 -07:00
parent a5dfd6395a
commit 58fc6bb98e

View file

@ -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,
});