aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/plugins/plugin-manager.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib/plugins/plugin-manager.ts')
-rw-r--r--server/lib/plugins/plugin-manager.ts7
1 files changed, 6 insertions, 1 deletions
diff --git a/server/lib/plugins/plugin-manager.ts b/server/lib/plugins/plugin-manager.ts
index afc07a151..cfe63e50d 100644
--- a/server/lib/plugins/plugin-manager.ts
+++ b/server/lib/plugins/plugin-manager.ts
@@ -13,7 +13,7 @@ import { RegisterSettingOptions } from '../../../shared/models/plugins/register-
13import { RegisterHookOptions } from '../../../shared/models/plugins/register-hook.model' 13import { RegisterHookOptions } from '../../../shared/models/plugins/register-hook.model'
14import { PluginSettingsManager } from '../../../shared/models/plugins/plugin-settings-manager.model' 14import { PluginSettingsManager } from '../../../shared/models/plugins/plugin-settings-manager.model'
15import { PluginStorageManager } from '../../../shared/models/plugins/plugin-storage-manager.model' 15import { PluginStorageManager } from '../../../shared/models/plugins/plugin-storage-manager.model'
16import { ServerHook, ServerHookName } from '../../../shared/models/plugins/server-hook.model' 16import { ServerHook, ServerHookName, serverHookObject } from '../../../shared/models/plugins/server-hook.model'
17import { getHookType, internalRunHook } from '../../../shared/core-utils/plugins/hooks' 17import { getHookType, internalRunHook } from '../../../shared/core-utils/plugins/hooks'
18import { RegisterOptions } from '../../typings/plugins/register-options.model' 18import { RegisterOptions } from '../../typings/plugins/register-options.model'
19import { PluginLibrary } from '../../typings/plugins' 19import { PluginLibrary } from '../../typings/plugins'
@@ -388,6 +388,11 @@ export class PluginManager implements ServerHook {
388 388
389 private getRegisterHelpers (npmName: string, plugin: PluginModel): RegisterOptions { 389 private getRegisterHelpers (npmName: string, plugin: PluginModel): RegisterOptions {
390 const registerHook = (options: RegisterHookOptions) => { 390 const registerHook = (options: RegisterHookOptions) => {
391 if (serverHookObject[options.target] !== true) {
392 logger.warn('Unknown hook %s of plugin %s. Skipping.', options.target, npmName)
393 return
394 }
395
391 if (!this.hooks[options.target]) this.hooks[options.target] = [] 396 if (!this.hooks[options.target]) this.hooks[options.target] = []
392 397
393 this.hooks[options.target].push({ 398 this.hooks[options.target].push({