Hopefully fix url embed from resources that don't work well with the url redirect
continuous-integration/appveyor/branch AppVeyor build succeeded Details

master discord_embed_v1.0.13
Jonatan Nilsson 2023-01-09 08:27:07 +00:00
parent 260f2b6c7e
commit 97b54d23c4
2 changed files with 4 additions and 2 deletions

View File

@ -38,7 +38,9 @@ export default class ServeHandler extends Parent {
let res = await ctx.db.safeCallProc('discord_embed.link_get', [id - 3843])
if (res.first.length) {
videoLink = ctx.state.video = res.first[0].video_link
if (!ctx.state.video.startsWith('https://cdn.discordapp.com') && !ctx.state.video.includes('catbox.')) {
if (!ctx.state.video.startsWith('https://cdn.discordapp.com')
&& !ctx.state.video.includes('catbox.')
&& ctx.state.video.includes('?')) {
videoLink = this.frontend + '/video/' + ctx.url.slice(1) + '.webm'
}
imageLink = res.first[0].image_link

View File

@ -1,6 +1,6 @@
{
"name": "discord_embed",
"version": "1.0.12",
"version": "1.0.13",
"port": 4120,
"description": "AV1 discord server embed helper",
"main": "index.js",