Filter more message flags/keywords/tags

This commit is contained in:
the-djmaze 2022-06-10 01:06:17 +02:00
parent 5a47893cd2
commit 8cf8502485
2 changed files with 24 additions and 5 deletions

View file

@ -36,23 +36,37 @@ const
}, },
ignoredTags = [ ignoredTags = [
// rfc5788
'$forwarded', '$forwarded',
'$mdnsent', '$mdnsent',
'$readreceipt', '$submitpending',
'$submitted',
// rfc9051
'$junk',
'$notjunk',
'$phishing',
// Mailo // Mailo
'sent', 'sent',
// KMail // KMail
'$attachment',
'$encrypted',
'$error',
'$ignored',
'$invitation',
'$queued',
'$replied',
'$sent', '$sent',
'$signed', '$signed',
'$error', '$todo',
'$queued', '$watched',
// GMail // GMail
'$replied', '$replied',
'$attachment', '$attachment',
'$notphishing', '$notphishing',
'$phishing',
'junk', 'junk',
'nonjunk' 'nonjunk',
// Others
'$readreceipt'
], ],
toggleTag = (message, keyword) => { toggleTag = (message, keyword) => {

View file

@ -199,6 +199,11 @@ trait Response
if (false !== $key) { if (false !== $key) {
$mResult['Flags'][$key] = '$mdnsent'; $mResult['Flags'][$key] = '$mdnsent';
} }
// KMail
$key = \array_search('$replied', $mResult['Flags']);
if (false !== $key) {
$mResult['Flags'][$key] = '\\answered';
}
$mResult['Flags'] = \array_unique($mResult['Flags']); $mResult['Flags'] = \array_unique($mResult['Flags']);