mirror of
https://github.com/mjl-/mox.git
synced 2025-07-12 17:44:35 +03:00
Fix bug gathering "changes" to broadcast during a mailbox rename in certain situations
We weren't appending the individual changes to the slice, but the entire slice. Since "Change" is an "any", this isn't a type error. So make a Change a non-empty interface (I had seen an issue like this coming, should have made it an interface then, at least now we have a reasonable method, to get the modseq of a change). Found while working on an imap webpush prototype.
This commit is contained in:
@ -3578,7 +3578,7 @@ func (a *Account) MailboxRename(tx *bstore.Tx, mbsrc *Mailbox, dst string, modse
|
||||
|
||||
// If we were moved from a/b to a/b/x, we mention the creation of a/b after we mentioned the rename.
|
||||
if strings.HasPrefix(dst, origName+"/") {
|
||||
changes = append(changes, parentChanges)
|
||||
changes = append(changes, parentChanges...)
|
||||
} else {
|
||||
changes = slices.Concat(parentChanges, changes)
|
||||
}
|
||||
|
Reference in New Issue
Block a user