mirror of
https://github.com/the-djmaze/snappymail.git
synced 2024-12-27 01:28:56 +08:00
Bugfix Sieve rfc5429
This commit is contained in:
parent
a96ff94c6f
commit
6a715da1ac
1 changed files with 15 additions and 38 deletions
|
@ -8,22 +8,17 @@ import {
|
||||||
GrammarString
|
GrammarString
|
||||||
} from 'Sieve/Grammar';
|
} from 'Sieve/Grammar';
|
||||||
|
|
||||||
/**
|
class rfc5429Command extends ActionCommand
|
||||||
* https://tools.ietf.org/html/rfc5429#section-2.1
|
|
||||||
*/
|
|
||||||
export class ErejectCommand extends ActionCommand
|
|
||||||
{
|
{
|
||||||
constructor()
|
constructor(identifier)
|
||||||
{
|
{
|
||||||
super();
|
super(identifier);
|
||||||
this._reason = new GrammarQuotedString;
|
this._reason = new GrammarQuotedString;
|
||||||
}
|
}
|
||||||
|
|
||||||
get require() { return 'ereject'; }
|
|
||||||
|
|
||||||
toString()
|
toString()
|
||||||
{
|
{
|
||||||
return 'ereject ' + this._reason + ';';
|
return this.require + ' ' + this._reason + ';';
|
||||||
}
|
}
|
||||||
|
|
||||||
get reason()
|
get reason()
|
||||||
|
@ -44,38 +39,20 @@ export class ErejectCommand extends ActionCommand
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* https://tools.ietf.org/html/rfc5429#section-2.1
|
||||||
|
*/
|
||||||
|
export class ErejectCommand extends rfc5429Command
|
||||||
|
{
|
||||||
|
constructor() { super('ereject'); }
|
||||||
|
get require() { return 'ereject'; }
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* https://tools.ietf.org/html/rfc5429#section-2.2
|
* https://tools.ietf.org/html/rfc5429#section-2.2
|
||||||
*/
|
*/
|
||||||
export class RejectCommand extends ActionCommand
|
export class RejectCommand extends rfc5429Command
|
||||||
{
|
{
|
||||||
constructor()
|
constructor() { super('reject'); }
|
||||||
{
|
|
||||||
super();
|
|
||||||
this._reason = new GrammarQuotedString;
|
|
||||||
}
|
|
||||||
|
|
||||||
get require() { return 'reject'; }
|
get require() { return 'reject'; }
|
||||||
|
|
||||||
toString()
|
|
||||||
{
|
|
||||||
return 'reject ' + this._reason + ';';
|
|
||||||
}
|
|
||||||
|
|
||||||
get reason()
|
|
||||||
{
|
|
||||||
return this._reason.value;
|
|
||||||
}
|
|
||||||
|
|
||||||
set reason(value)
|
|
||||||
{
|
|
||||||
this._reason.value = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
pushArguments(args)
|
|
||||||
{
|
|
||||||
if (args[0] instanceof GrammarString) {
|
|
||||||
this._reason = args[0];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue