mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-17 23:56:56 +00:00
Import encrypted messages as is
This commit is contained in:
@ -67,6 +67,14 @@ func (req *ImportReq) WriteTo(w *multipart.Writer) (err error) {
|
||||
if _, err = fw.Write(msg.Body); err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
// Adding new line to properly fetch the whole body on the API side.
|
||||
// The reason is the bug in PHP: https://bugs.php.net/bug.php?id=75923
|
||||
// Messages generated by PM already have it but importing already
|
||||
// encrypted messages might not have it.
|
||||
if _, err = fw.Write([]byte("\r\n")); err != nil {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user