mirror of
https://github.com/bulwarkmail/native.git
synced 2026-11-02 00:06:23 +00:00
feat: warn about the server's forward limit and an auto-reply too long for it (bulwarkmail/webmail#1155, bulwarkmail/webmail#1208)
This commit is contained in:
@@ -33,6 +33,16 @@ export class FiltersLoginChangedError extends Error {
|
||||
}
|
||||
}
|
||||
|
||||
/** The account's filters as the server has them now (its active script, parsed). */
|
||||
export async function readAccountFilters(accountId: string = getSieveAccountId()): Promise<ParseResult> {
|
||||
const all = await getSieveScripts(accountId);
|
||||
const scripts = all.filter((s) => s.name !== VACATION_SCRIPT_NAME);
|
||||
const script = scripts.find((s) => s.isActive) || scripts[0] || null;
|
||||
return script
|
||||
? parseScript(await getSieveScriptContent(script.blobId, accountId))
|
||||
: { rules: [], isOpaque: false, externalRequires: [] };
|
||||
}
|
||||
|
||||
/**
|
||||
* Read the account's script from the server, let `modify` change its rules,
|
||||
* and write the result back as the active script, keeping the vacation
|
||||
|
||||
Reference in New Issue
Block a user