From 10e3ef7ac4107cd4ec59677647e074454269184f Mon Sep 17 00:00:00 2001 From: tycrek Date: Thu, 15 Apr 2021 12:30:13 -0600 Subject: [PATCH] removed need for checking if video --- ass.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ass.js b/ass.js index 156e1b9..5ab9155 100755 --- a/ass.js +++ b/ass.js @@ -108,8 +108,8 @@ function startup() { // If the ID is invalid, return 404 if (!resourceId || !data[resourceId]) return res.sendStatus(404); - // If a Discord client wants to load an mp4, send the data needed for a proper inline embed - if (req.useragent.isBot /* && data[resourceId].mimetype == 'video/mp4' */) return res.type('html').send(new OpenGraph(getTrueHttp(), getTrueDomain(), resourceId, data[resourceId]).build()); + // If the client is Discord, send an Open Graph embed + if (req.useragent.isBot) return res.type('html').send(new OpenGraph(getTrueHttp(), getTrueDomain(), resourceId, data[resourceId]).build()); // Read the file and send it to the client fs.readFile(path(data[resourceId].path))