diff options
author | Chocobozzz <me@florianbigard.com> | 2022-05-31 14:18:41 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-05-31 14:24:07 +0200 |
commit | d3f4689bded2a6f5b589fe79c3f8b6082d553d9e (patch) | |
tree | 94008e70583444cae96941b6d474f7b6bbd513d1 /server/lib/client-html.ts | |
parent | f1a0f3b701e005a9533f09b7913c615376e42f32 (diff) | |
download | PeerTube-d3f4689bded2a6f5b589fe79c3f8b6082d553d9e.tar.gz PeerTube-d3f4689bded2a6f5b589fe79c3f8b6082d553d9e.tar.zst PeerTube-d3f4689bded2a6f5b589fe79c3f8b6082d553d9e.zip |
Add live autostart/messages in embed
Diffstat (limited to 'server/lib/client-html.ts')
-rw-r--r-- | server/lib/client-html.ts | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/server/lib/client-html.ts b/server/lib/client-html.ts index 337364ac9..1e8d03023 100644 --- a/server/lib/client-html.ts +++ b/server/lib/client-html.ts | |||
@@ -30,6 +30,7 @@ import { MAccountActor, MChannelActor } from '../types/models' | |||
30 | import { getActivityStreamDuration } from './activitypub/activity' | 30 | import { getActivityStreamDuration } from './activitypub/activity' |
31 | import { getBiggestActorImage } from './actor-image' | 31 | import { getBiggestActorImage } from './actor-image' |
32 | import { ServerConfigManager } from './server-config-manager' | 32 | import { ServerConfigManager } from './server-config-manager' |
33 | import { isTestInstance } from '@server/helpers/core-utils' | ||
33 | 34 | ||
34 | type Tags = { | 35 | type Tags = { |
35 | ogType: string | 36 | ogType: string |
@@ -232,7 +233,10 @@ class ClientHtml { | |||
232 | static async getEmbedHTML () { | 233 | static async getEmbedHTML () { |
233 | const path = ClientHtml.getEmbedPath() | 234 | const path = ClientHtml.getEmbedPath() |
234 | 235 | ||
235 | if (ClientHtml.htmlCache[path]) return ClientHtml.htmlCache[path] | 236 | // Disable HTML cache in dev mode because webpack can regenerate JS files |
237 | if (!isTestInstance() && ClientHtml.htmlCache[path]) { | ||
238 | return ClientHtml.htmlCache[path] | ||
239 | } | ||
236 | 240 | ||
237 | const buffer = await readFile(path) | 241 | const buffer = await readFile(path) |
238 | const serverConfig = await ServerConfigManager.Instance.getHTMLServerConfig() | 242 | const serverConfig = await ServerConfigManager.Instance.getHTMLServerConfig() |