Skip to content
Snippets Groups Projects
Commit 6948717c authored by Felipe Cecagno's avatar Felipe Cecagno
Browse files

revert getRaw option to enable/disable raw format callback

parent a76b0172
No related branches found
No related tags found
No related merge requests found
...@@ -29,7 +29,7 @@ if (!config.hooks.permanentURLs) { config.hooks.permanentURLs = []; } ...@@ -29,7 +29,7 @@ if (!config.hooks.permanentURLs) { config.hooks.permanentURLs = []; }
// How many messages will be enqueued to be processed at the same time // How many messages will be enqueued to be processed at the same time
if (config.hooks.queueSize == null) { config.hooks.queueSize = 10000; } if (config.hooks.queueSize == null) { config.hooks.queueSize = 10000; }
// Allow permanent hooks to receive raw message, which is the message straight from BBB // 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: // 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) // "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. // when there are more than 1 event on the queue at the moment of processing the queue.
......
...@@ -23,7 +23,7 @@ config.server.port = 3005; ...@@ -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) // 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 } ] //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 // Allow global hook to receive all events with raw data
//config.hooks.defaultGetRaw = false; //config.hooks.getRaw = false;
module.exports = config; module.exports = config;
...@@ -142,7 +142,7 @@ module.exports = class WebHooks { ...@@ -142,7 +142,7 @@ module.exports = class WebHooks {
}); });
const sendRaw = hooks.some(hook => { return hook.getRaw }); const sendRaw = hooks.some(hook => { return hook.getRaw });
if (sendRaw) { if (sendRaw && config.hooks.getRaw) {
this._processRaw(raw); this._processRaw(raw);
} }
} }
......
...@@ -52,7 +52,7 @@ module.exports = class WebServer { ...@@ -52,7 +52,7 @@ module.exports = class WebServer {
if (getRaw){ if (getRaw){
getRaw = JSON.parse(getRaw.toLowerCase()); getRaw = JSON.parse(getRaw.toLowerCase());
} else { } else {
getRaw = config.hooks.defaultGetRaw; getRaw = false;
} }
if (callbackURL == null) { if (callbackURL == null) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment