From d3f4689bded2a6f5b589fe79c3f8b6082d553d9e Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 31 May 2022 14:18:41 +0200 Subject: Add live autostart/messages in embed --- server/lib/client-html.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'server') 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' import { getActivityStreamDuration } from './activitypub/activity' import { getBiggestActorImage } from './actor-image' import { ServerConfigManager } from './server-config-manager' +import { isTestInstance } from '@server/helpers/core-utils' type Tags = { ogType: string @@ -232,7 +233,10 @@ class ClientHtml { static async getEmbedHTML () { const path = ClientHtml.getEmbedPath() - if (ClientHtml.htmlCache[path]) return ClientHtml.htmlCache[path] + // Disable HTML cache in dev mode because webpack can regenerate JS files + if (!isTestInstance() && ClientHtml.htmlCache[path]) { + return ClientHtml.htmlCache[path] + } const buffer = await readFile(path) const serverConfig = await ServerConfigManager.Instance.getHTMLServerConfig() -- cgit v1.2.3