removed dead if

This commit is contained in:
Andris Reinman 2017-12-22 11:26:19 +02:00
parent 029aeecc23
commit 766b0ac1cb
2 changed files with 18 additions and 23 deletions

View file

@ -266,30 +266,26 @@ class FilterHandler {
matchingFilters.push(filter.id);
// apply matching filter
if (!filterActions) {
filterActions = filter.action;
} else {
Object.keys(filter.action).forEach(key => {
if (key === 'forward') {
[].concat(filter.action[key] || []).forEach(address => {
forwardTargets.set(address, { type: 'mail', value: address });
});
return;
}
Object.keys(filter.action).forEach(key => {
if (key === 'forward') {
[].concat(filter.action[key] || []).forEach(address => {
forwardTargets.set(address, { type: 'mail', value: address });
});
return;
}
if (key === 'targetUrl') {
[].concat(filter.action[key] || []).forEach(address => {
forwardTargets.set(address, { type: 'http', value: address });
});
return;
}
if (key === 'targetUrl') {
[].concat(filter.action[key] || []).forEach(address => {
forwardTargets.set(address, { type: 'http', value: address });
});
return;
}
// if a previous filter already has set a value then do not touch it
if (!filterActions.has(key)) {
filterActions.set(key, filter.action[key]);
}
});
}
// if a previous filter already has set a value then do not touch it
if (!filterActions.has(key)) {
filterActions.set(key, filter.action[key]);
}
});
});
let encryptMessage = (condition, next) => {

View file

@ -131,7 +131,6 @@ const serverOptions = {
let stored = 0;
let transactionId = new ObjectID();
let prepared = false;
let storeNext = () => {