mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-15 14:56:42 +00:00
fix(BRIDGE-362): added label conflict reconciliation logic
This commit is contained in:
@ -102,6 +102,16 @@ func newMailboxCreatedUpdate(labelID imap.MailboxID, labelName []string) *imap.M
|
||||
})
|
||||
}
|
||||
|
||||
func newMailboxUpdatedOrCreated(labelID imap.MailboxID, labelName []string) *imap.MailboxUpdatedOrCreated {
|
||||
return imap.NewMailboxUpdatedOrCreated(imap.Mailbox{
|
||||
ID: labelID,
|
||||
Name: labelName,
|
||||
Flags: defaultMailboxFlags(),
|
||||
PermanentFlags: defaultMailboxPermanentFlags(),
|
||||
Attributes: imap.NewFlagSet(),
|
||||
})
|
||||
}
|
||||
|
||||
func GetMailboxName(label proton.Label) []string {
|
||||
var name []string
|
||||
|
||||
@ -122,3 +132,12 @@ func GetMailboxName(label proton.Label) []string {
|
||||
|
||||
return name
|
||||
}
|
||||
|
||||
func nameWithTempPrefix(path []string) []string {
|
||||
path[len(path)-1] = "tmp_" + path[len(path)-1]
|
||||
return path
|
||||
}
|
||||
|
||||
func getMailboxNameWithTempPrefix(label proton.Label) []string {
|
||||
return nameWithTempPrefix(GetMailboxName(label))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user