mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-06-27 08:46:44 +03:00
Handle message hasVirus header in JavaScript
This commit is contained in:
parent
e133cf5ffb
commit
f0bb3a8a45
2 changed files with 17 additions and 27 deletions
|
|
@ -257,13 +257,28 @@ export class MessageModel extends AbstractModel {
|
|||
}
|
||||
|
||||
// Unsubscribe links
|
||||
value = headers.valueByName('List-Unsubscribe');
|
||||
if (value) {
|
||||
if (value = headers.valueByName('List-Unsubscribe')) {
|
||||
this.unsubsribeLinks(value.split(',').map(
|
||||
link => link.replace(/^[ <>]+|[ <>]+$/g, '')
|
||||
));
|
||||
}
|
||||
|
||||
if (headers.valueByName('X-Virus')) {
|
||||
this.hasVirus(true);
|
||||
}
|
||||
if (value = headers.valueByName('X-Virus-Status')) {
|
||||
if (value.includes('infected')) {
|
||||
this.hasVirus(true);
|
||||
} else if (value.includes('clean')) {
|
||||
this.hasVirus(false);
|
||||
}
|
||||
}
|
||||
/*
|
||||
if (value = headers.valueByName('X-Virus-Scanned')) {
|
||||
this.virusScanned(value);
|
||||
}
|
||||
*/
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue