diff --git a/bbb-webhooks/config.js b/bbb-webhooks/config.js index 34155b3a9d45ef61c76d9df33688a252e22921c2..80845f1fc9183e360f06b21d470aa922442451df 100644 --- a/bbb-webhooks/config.js +++ b/bbb-webhooks/config.js @@ -29,7 +29,7 @@ if (!config.hooks.permanentURLs) { config.hooks.permanentURLs = []; } // How many messages will be enqueued to be processed at the same time if (config.hooks.queueSize == null) { config.hooks.queueSize = 10000; } // Allow permanent hooks to receive raw message, which is the message straight from BBB -if (config.hooks.defaultGetRaw == null) { config.hooks.defaultGetRaw = false; } +if (config.hooks.getRaw == null) { config.hooks.getRaw = true; } // If set to higher than 1, will send events on the format: // "event=[{event1},{event2}],timestamp=000" or "[{event1},{event2}]" (based on using auth2_0 or not) // when there are more than 1 event on the queue at the moment of processing the queue. diff --git a/bbb-webhooks/config_local.js.example b/bbb-webhooks/config_local.js.example index f3274bb5e7820055675c3b6d9f6bbd6674df90d8..0a64ac0d5fc504b12c270cead9d4cd99d0e4f7ea 100644 --- a/bbb-webhooks/config_local.js.example +++ b/bbb-webhooks/config_local.js.example @@ -23,7 +23,7 @@ config.server.port = 3005; // IP where permanent hook will post data (more than 1 URL means more than 1 permanent hook) //config.hooks.permanentURLs = [ { url: "request.catcher.url", getRaw: false }, { url: "another.request.catcher.url", getRaw: true } ] -// Determine default behaviour when getRaw isn't defined while registering the hook -//config.hooks.defaultGetRaw = false; +// Allow global hook to receive all events with raw data +//config.hooks.getRaw = false; module.exports = config; diff --git a/bbb-webhooks/web_hooks.js b/bbb-webhooks/web_hooks.js index 2b1f50605d7488e51040270443bbb0984cb6dd79..a91718f1e889e6724f1ec35b095f7011f5c4919c 100644 --- a/bbb-webhooks/web_hooks.js +++ b/bbb-webhooks/web_hooks.js @@ -142,7 +142,7 @@ module.exports = class WebHooks { }); const sendRaw = hooks.some(hook => { return hook.getRaw }); - if (sendRaw) { + if (sendRaw && config.hooks.getRaw) { this._processRaw(raw); } } diff --git a/bbb-webhooks/web_server.js b/bbb-webhooks/web_server.js index 072a2ad8e3c7d6874719b604140bda095fc6486e..e0f77f0b405a6d7c55e3052ae6fd4d11136137dc 100644 --- a/bbb-webhooks/web_server.js +++ b/bbb-webhooks/web_server.js @@ -52,7 +52,7 @@ module.exports = class WebServer { if (getRaw){ getRaw = JSON.parse(getRaw.toLowerCase()); } else { - getRaw = config.hooks.defaultGetRaw; + getRaw = false; } if (callbackURL == null) {