mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-10 04:36:43 +00:00
fix(GODT-3003): Ensure IMAP State is reset after vault corruption
After we detect that the user has suffered the GODT-3003 bug due the vault corruption not ensuring that a previous sync state would be erased, we patch the gluon db directly and then reset the sync state. After the account is added, the sync is automatically triggered and the account state fixes itself.
This commit is contained in:
@ -158,7 +158,7 @@ func NewService(
|
||||
syncUpdateApplier: syncUpdateApplier,
|
||||
syncMessageBuilder: syncMessageBuilder,
|
||||
syncReporter: syncReporter,
|
||||
syncConfigPath: getSyncConfigPath(syncConfigDir, identityState.User.ID),
|
||||
syncConfigPath: GetSyncConfigPath(syncConfigDir, identityState.User.ID),
|
||||
}
|
||||
}
|
||||
|
||||
@ -498,6 +498,7 @@ func (s *Service) buildConnectors() (map[string]*Connector, error) {
|
||||
s.panicHandler,
|
||||
s.telemetry,
|
||||
s.showAllMail,
|
||||
s.syncStateProvider,
|
||||
)
|
||||
|
||||
return connectors, nil
|
||||
@ -514,6 +515,7 @@ func (s *Service) buildConnectors() (map[string]*Connector, error) {
|
||||
s.panicHandler,
|
||||
s.telemetry,
|
||||
s.showAllMail,
|
||||
s.syncStateProvider,
|
||||
)
|
||||
}
|
||||
|
||||
@ -644,6 +646,6 @@ type setAddressModeReq struct {
|
||||
|
||||
type getSyncFailedMessagesReq struct{}
|
||||
|
||||
func getSyncConfigPath(path string, userID string) string {
|
||||
func GetSyncConfigPath(path string, userID string) string {
|
||||
return filepath.Join(path, fmt.Sprintf("sync-%v", userID))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user