Remove backward compatibility (peertubeHelpers.plugin always available).

This commit is contained in:
John Livingston
2021-06-02 15:48:56 +02:00
parent 22f392d838
commit 10bbb7f040
3 changed files with 9 additions and 14 deletions

View File

@ -12,8 +12,8 @@ async function getWorkingDir (options: RegisterServerOptions): Promise<string> {
const logger = peertubeHelpers.logger
logger.debug('Calling getWorkingDir')
if (!peertubeHelpers.plugin?.getDataDirectoryPath) {
throw new Error('Cant get the plugin Data Directory')
if (!peertubeHelpers.plugin) {
throw new Error('Missing peertubeHelpers.plugin, have you the correct Peertube version?')
}
const dir = path.resolve(peertubeHelpers.plugin.getDataDirectoryPath(), 'prosody')
logger.debug('getWorkingDir will return the dir ' + dir)