only test subtype

This commit is contained in:
revsuine 2024-11-05 17:16:14 +00:00
parent 9c5567addf
commit dc7bebde92
Signed by: revsuine
GPG key ID: 3F257B68F5BC9339

View file

@ -44,7 +44,7 @@ def is_message_encrypted(message: email.message.Message) -> bool:
Currently just does it by checking the content type header: Currently just does it by checking the content type header:
https://stackoverflow.com/questions/18819126/checking-encryption-status-of-email""" https://stackoverflow.com/questions/18819126/checking-encryption-status-of-email"""
return message.get_content_type() == "multipart/encrypted" return message.get_content_subtype() == "encrypted"
def encrypt( def encrypt(
message: email.message.Message, message: email.message.Message,