mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +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 { AbstractModel } from 'Knoin/AbstractModel';
|
||||||
import { FilterModel } from 'Model/Filter';
|
import { FilterModel } from 'Model/Filter';
|
||||||
|
import { pString } from 'Common/Utils';
|
||||||
|
|
||||||
const SIEVE_FILE_NAME = 'rainloop.user';
|
const SIEVE_FILE_NAME = 'rainloop.user';
|
||||||
|
|
||||||
|
|
@ -153,12 +154,12 @@ function filtersToSieveScript(filters)
|
||||||
subject = ':subject ' + quote(StripSpaces(paramValue)) + ' ';
|
subject = ':subject ' + quote(StripSpaces(paramValue)) + ' ';
|
||||||
}
|
}
|
||||||
|
|
||||||
paramValue = filter.actionValueThird().trim();
|
paramValue = pString(filter.actionValueThird()).trim();
|
||||||
if (paramValue.length) {
|
if (paramValue.length) {
|
||||||
days = Math.max(1, parseInt(paramValue, 10));
|
days = Math.max(1, parseInt(paramValue, 10));
|
||||||
}
|
}
|
||||||
|
|
||||||
paramValue = filter.actionValueFourth().trim()
|
paramValue = pString(filter.actionValueFourth()).trim()
|
||||||
if (paramValue.length) {
|
if (paramValue.length) {
|
||||||
paramValue = paramValue.split(',').map(email =>
|
paramValue = paramValue.split(',').map(email =>
|
||||||
email.trim().length ? quote(email) : ''
|
email.trim().length ? quote(email) : ''
|
||||||
|
|
@ -303,7 +304,7 @@ export class SieveScriptModel extends AbstractModel
|
||||||
toJson() {
|
toJson() {
|
||||||
return {
|
return {
|
||||||
name: this.name(),
|
name: this.name(),
|
||||||
active: this.active() ? '1' : '0',
|
active: this.active() ? 1 : 0,
|
||||||
body: this.body(),
|
body: this.body(),
|
||||||
filters: this.filters.map(item => item.toJson())
|
filters: this.filters.map(item => item.toJson())
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue