From cbc432cfd802fe598ff43e4098aa87c55bc2a1c6 Mon Sep 17 00:00:00 2001 From: tycrek Date: Tue, 15 Jun 2021 11:04:13 -0600 Subject: [PATCH] live-testing Discord oEmbed fixes ugh --- ass.js | 4 ++-- ogp.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ass.js b/ass.js index 37600c2..b9598c6 100755 --- a/ass.js +++ b/ass.js @@ -182,7 +182,7 @@ function startup() { // oEmbed response for clickable authors/providers // https://oembed.com/ // https://old.reddit.com/r/discordapp/comments/82p8i6/a_basic_tutorial_on_how_to_get_the_most_out_of/ - app.get('/:resourceId/oembed', (req, res) => { + app.get('/:resourceId/oembed.json', (req, res) => { // Parse the resource ID let resourceId = req.params.resourceId.split('.')[0]; @@ -191,7 +191,7 @@ function startup() { // Build the oEmbed object let { opengraph } = data[resourceId]; - let oembed = {}; + let oembed = { version: '1.0' }; opengraph.author && (oembed.author_name = opengraph.author); opengraph.authorUrl && (oembed.author_url = opengraph.authorUrl); opengraph.provider && (oembed.provider_name = opengraph.provider); diff --git a/ogp.js b/ogp.js index 41567dd..606ae5e 100644 --- a/ogp.js +++ b/ogp.js @@ -65,7 +65,7 @@ const html = ` ass - + {{{title}}} {{{description}}} {{{site}}}