Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

Prevent warning at startup

Chocobozzz81107dceae8e
diff --git a/server/core/lib/plugins/plugin-manager.ts b/server/core/lib/plugins/plugin-manager.ts
index 1c4cf3d347..179fbdeb66 100644
--- a/server/core/lib/plugins/plugin-manager.ts
+++ b/server/core/lib/plugins/plugin-manager.ts
@@ -304,12 +304,12 @@ export class PluginManager implements ServerHook {
this.sortHooksByPriority()
}
- async removeUnsecurePluginsIfNeeded () {
+ async removeUnsecurePluginsIfNeededBeforeRegistration () {
for (const npmName of UNSECURE_PLUGINS_TO_REMOVE) {
const plugin = await PluginModel.loadByNpmName(npmName)
if (!plugin || plugin.uninstalled === true) continue
- await this.uninstall({ npmName })
+ await this.uninstall({ npmName, unregister: false })
}
}
diff --git a/server/server.ts b/server/server.ts
index 1716aef8d2..beb9db0771 100644
--- a/server/server.ts
+++ b/server/server.ts
@@ -349,7 +349,7 @@ async function startApplication () {
server.listen(port, hostname, async () => {
if (cliOptions.plugins) {
try {
- await PluginManager.Instance.removeUnsecurePluginsIfNeeded()
+ await PluginManager.Instance.removeUnsecurePluginsIfNeededBeforeRegistration()
await PluginManager.Instance.rebuildNativePluginsIfNeeded()