mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-11 00:14:50 +03:00
Resolved Issue #59
This commit is contained in:
parent
6d16a533fe
commit
5a3745a8ca
1 changed files with 4 additions and 3 deletions
|
|
@ -2,6 +2,7 @@ import ko from 'ko';
|
|||
|
||||
import { AbstractModel } from 'Knoin/AbstractModel';
|
||||
import { FilterModel } from 'Model/Filter';
|
||||
import { pString } from 'Common/Utils';
|
||||
|
||||
const SIEVE_FILE_NAME = 'rainloop.user';
|
||||
|
||||
|
|
@ -153,12 +154,12 @@ function filtersToSieveScript(filters)
|
|||
subject = ':subject ' + quote(StripSpaces(paramValue)) + ' ';
|
||||
}
|
||||
|
||||
paramValue = filter.actionValueThird().trim();
|
||||
paramValue = pString(filter.actionValueThird()).trim();
|
||||
if (paramValue.length) {
|
||||
days = Math.max(1, parseInt(paramValue, 10));
|
||||
}
|
||||
|
||||
paramValue = filter.actionValueFourth().trim()
|
||||
paramValue = pString(filter.actionValueFourth()).trim()
|
||||
if (paramValue.length) {
|
||||
paramValue = paramValue.split(',').map(email =>
|
||||
email.trim().length ? quote(email) : ''
|
||||
|
|
@ -303,7 +304,7 @@ export class SieveScriptModel extends AbstractModel
|
|||
toJson() {
|
||||
return {
|
||||
name: this.name(),
|
||||
active: this.active() ? '1' : '0',
|
||||
active: this.active() ? 1 : 0,
|
||||
body: this.body(),
|
||||
filters: this.filters.map(item => item.toJson())
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue