mirror of
https://github.com/nodemailer/wildduck.git
synced 2025-01-09 09:27:38 +08:00
25 lines
645 B
JavaScript
25 lines
645 B
JavaScript
'use strict';
|
|
|
|
module.exports = {
|
|
state: ['Authenticated'],
|
|
schema: false,
|
|
|
|
handler(command, callback) {
|
|
let enabled = [];
|
|
|
|
command.attributes.map(attr => {
|
|
// only CONDSTORE is supported for now
|
|
if ((attr && attr.value || '').toString().toUpperCase() === 'CONDSTORE') {
|
|
this.condstoreEnabled = true;
|
|
enabled.push('CONDSTORE');
|
|
}
|
|
});
|
|
|
|
this.send('* ENABLED' + (enabled.length ? ' ' : '') + enabled.join(' '));
|
|
|
|
callback(null, {
|
|
response: 'OK',
|
|
message: 'Conditional Store enabled'
|
|
});
|
|
}
|
|
};
|