mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2026-02-11 19:48:32 +00:00
Import encrypted messages as is
This commit is contained in:
@ -253,6 +253,10 @@ func (m *Message) HasLabelID(labelID string) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (m *Message) IsEncrypted() bool {
|
||||
return strings.HasPrefix(m.Header.Get("Content-Type"), "multipart/encrypted") || m.IsBodyEncrypted()
|
||||
}
|
||||
|
||||
func (m *Message) IsBodyEncrypted() bool {
|
||||
trimmedBody := strings.TrimSpace(m.Body)
|
||||
return strings.HasPrefix(trimmedBody, MessageHeader) &&
|
||||
|
||||
Reference in New Issue
Block a user