mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-17 15:46:44 +00:00
Importing to sent and inbox
This commit is contained in:
@ -60,10 +60,12 @@ func GetFlags(m *pmapi.Message) (flags []string) {
|
||||
}
|
||||
|
||||
func ParseFlags(m *pmapi.Message, flags []string) {
|
||||
// Consider to use ComputeMessageFlagsByLabels to keep logic in one place.
|
||||
if (m.Flags & pmapi.FlagSent) == 0 {
|
||||
m.Flags |= pmapi.FlagReceived
|
||||
if m.Header.Get("received") == "" {
|
||||
m.Flags = pmapi.FlagSent
|
||||
} else {
|
||||
m.Flags = pmapi.FlagReceived
|
||||
}
|
||||
|
||||
m.Unread = 1
|
||||
for _, f := range flags {
|
||||
switch f {
|
||||
|
||||
Reference in New Issue
Block a user