Add video support (experimental!)

This commit is contained in:
Cadence Fish
2020-01-30 04:20:20 +13:00
parent 95cc416e08
commit a5ab771969
7 changed files with 96 additions and 43 deletions

View File

@@ -92,6 +92,7 @@ module.exports = [
return getOrFetchShortcode(fill[0]).then(async post => {
await post.fetchChildren()
await post.fetchExtendedOwnerP() // parallel await is okay since intermediate fetch result is cached
if (post.isVideo()) await post.fetchVideoURL()
return render(200, "pug/post.pug", {post})
}).catch(error => {
if (error === constants.symbols.NOT_FOUND) {