GODT-1077 IMAP sync counting

This commit is contained in:
Michal Horejsek
2021-03-02 08:06:02 +01:00
parent ea306f405e
commit a94c8a943f
7 changed files with 133 additions and 13 deletions

View File

@ -148,3 +148,17 @@ func (message *Message) GetBodyStructure() (bs *pkgMsg.BodyStructure, err error)
}
return bs, nil
}
func (message *Message) IncreaseBuildCount() (times uint32, err error) {
txUpdate := func(tx *bolt.Tx) error {
times, err = message.store.txIncreaseMsgBuildCount(
tx.Bucket(msgBuildCountBucket),
message.ID(),
)
return err
}
if err = message.store.db.Update(txUpdate); err != nil {
return 0, err
}
return times, nil
}