Merge pull request #5 from nbitzz:1.3.1

1.3.1
This commit is contained in:
May 2023-08-28 09:28:26 -07:00 committed by GitHub
commit 14576c9ed4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View file

@ -118,7 +118,7 @@ app.get("/download/:fileId",(req,res) => {
)
)
+ (
fileOwner?.embed?.largeImage && file.visibility!="anonymous"
fileOwner?.embed?.largeImage && file.visibility!="anonymous" && file.mime.startsWith("image/")
? `<meta name="twitter:card" content="summary_large_image">`
: ""
)
@ -161,4 +161,4 @@ app.listen(process.env.MONOFILE_PORT || 3000,function() {
console.log("Web OK!")
})
client.login(process.env.TOKEN)
client.login(process.env.TOKEN)

View file

@ -166,7 +166,7 @@ authRoutes.post("/embedcolor", requiresAccount, parser, (req,res) => {
if (
!req.body.color
|| (req.body.color.toLowerCase().match(/[a-f0-9]+/) == req.body.color)
|| (req.body.color.toLowerCase().match(/[a-f0-9]+/) == req.body.color.toLowerCase())
&& req.body.color.length == 6
) {
@ -458,4 +458,4 @@ authRoutes.get("/customCSS", (req,res) => {
res.send("")
}
} else res.send("")
})
})