Add option on list to disable "List-Unsubscribe" header
This commit is contained in:
parent
fc5fc5b09c
commit
16ce44146f
5 changed files with 37 additions and 3 deletions
|
@ -19,7 +19,7 @@ const UnsubscriptionMode = {
|
|||
|
||||
module.exports.UnsubscriptionMode = UnsubscriptionMode;
|
||||
|
||||
let allowedKeys = ['description', 'default_form', 'public_subscribe', 'unsubscription_mode'];
|
||||
let allowedKeys = ['description', 'default_form', 'public_subscribe', 'unsubscription_mode', 'listunsubscribe_disabled'];
|
||||
|
||||
module.exports.list = (start, limit, callback) => {
|
||||
tableHelpers.list('lists', ['*'], 'name', null, start, limit, callback);
|
||||
|
@ -158,6 +158,7 @@ module.exports.update = (id, updates, callback) => {
|
|||
// The update can be only partial when executed from forms/:list
|
||||
if (!data.customFormChangeOnly) {
|
||||
data.publicSubscribe = data.publicSubscribe ? 1 : 0;
|
||||
data.listunsubscribeDisabled = data.listunsubscribeDisabled ? 1 : 0;
|
||||
data.unsubscriptionMode = Number(data.unsubscriptionMode);
|
||||
|
||||
let name = (data.name || '').toString().trim();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue