Files
webmail/lib/spam-applicable.ts
T
Linus Rath 814945a445 fix: say Restore and Delete forever in Trash and stop offering Report spam there
The reader toolbar tests now find the quick reply box by either
placeholder: since the box names its recipients ("quick_reply_to"), the
old placeholder assertion failed and the Spam test passed vacuously.
2026-11-04 11:19:45 +01:00

9 lines
351 B
TypeScript

/**
* Whether "Report spam" makes sense for mail in a folder of this role. Not on
* your own outgoing mail (Sent, Drafts, Scheduled), and not in Trash, where
* the mail is already thrown out.
*/
export function spamApplicableIn(role: string | null | undefined): boolean {
return !["sent", "drafts", "scheduled", "trash"].includes(role || "");
}