mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-10 04:36:43 +00:00
fix(GODT-2935): Do not allow parentID into drafts
When sending a message ensure that if a ParentID matches a proton message, it is not a draft. This is not supported by the Proton API.
This commit is contained in:
@ -315,7 +315,11 @@ func getParentID(
|
||||
switch len(metadata) {
|
||||
case 1:
|
||||
// found exactly one parent
|
||||
// We can only reference messages that have been sent or received. If this message is a draft
|
||||
// it needs to be ignored.
|
||||
if metadata[0].Flags.Has(proton.MessageFlagSent) || metadata[0].Flags.Has(proton.MessageFlagReceived) {
|
||||
parentID = metadata[0].ID
|
||||
}
|
||||
case 0:
|
||||
// found no parents
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user