TF-2510 Validate outside & inline attachment

Signed-off-by: dab246 <tdvu@linagora.com>
This commit is contained in:
dab246
2024-01-26 08:18:31 +07:00
committed by Dat H. Pham
parent d98fcf72e0
commit ab717517fd
3 changed files with 21 additions and 10 deletions
@@ -27,4 +27,10 @@ extension AttachmentExtension on Attachment {
disposition: disposition ?? this.disposition
);
}
bool isOutsideAttachment(List<Attachment> htmlBodyAttachments) {
return (isDispositionAttachmentNoCID() || !isDispositionInlined()) &&
!isApplicationRTFInlined() &&
!htmlBodyAttachments.include(this);
}
}