diff --git a/lib/jf2-to-as2.js b/lib/jf2-to-as2.js index 00b4824..d1ebc65 100644 --- a/lib/jf2-to-as2.js +++ b/lib/jf2-to-as2.js @@ -165,7 +165,7 @@ export function jf2ToActivityStreams(properties, actorUrl, publicationUrl, optio if (ogMatch) { object.image = { type: "Image", - url: `${publicationUrl.replace(/\/$/, "")}/og/${ogMatch[2]}-${ogMatch[3]}-${ogMatch[4]}-${ogMatch[5]}.png`, + url: `${publicationUrl.replace(/\/$/, "")}/og/${ogMatch[5]}.png`, mediaType: "image/png", }; } @@ -366,7 +366,7 @@ export function jf2ToAS2Activity(properties, actorUrl, publicationUrl, options = const ogMatchF = postUrl && postUrl.match(/\/([\w-]+)\/(\d{4})\/(\d{2})\/(\d{2})\/([\w-]+)\/?$/); if (ogMatchF) { noteOptions.image = new Image({ - url: new URL(`${publicationUrl.replace(/\/$/, "")}/og/${ogMatchF[2]}-${ogMatchF[3]}-${ogMatchF[4]}-${ogMatchF[5]}.png`), + url: new URL(`${publicationUrl.replace(/\/$/, "")}/og/${ogMatchF[5]}.png`), mediaType: "image/png", }); }