From 25da6b6e0d0df6a2488f9b9228a952ccef181dbb Mon Sep 17 00:00:00 2001 From: John Livingston Date: Thu, 3 Jun 2021 11:53:18 +0200 Subject: [PATCH] Detect Peertube bad version at startup. --- server/main.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/server/main.ts b/server/main.ts index 3b5e242b..94154c46 100644 --- a/server/main.ts +++ b/server/main.ts @@ -11,6 +11,11 @@ let OPTIONS: RegisterServerOptions | undefined async function register (options: RegisterServerOptions): Promise { OPTIONS = options + // This is a trick to check that peertube is at least in version 3.2.0 + if (!options.peertubeHelpers.plugin) { + throw new Error('Your peertube version is not correct. This plugin is not compatible with Peertube < 3.2.0.') + } + await migrateSettings(options) await initSettings(options)