Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ActiveSync: Sync state per calendar or per account? #331

Open
benbucksch opened this issue Dec 28, 2024 · 1 comment
Open

ActiveSync: Sync state per calendar or per account? #331

benbucksch opened this issue Dec 28, 2024 · 1 comment
Assignees

Comments

@benbucksch
Copy link
Collaborator

benbucksch commented Dec 28, 2024

We're saving the SyncKey per ActiveSyncAccount, ActiveSyncCalendar and ActiveSyncAddressbook separately, one for each. Is that correct? Is the sync key for the entire account, or specific for a calendar, address book or email account?

I am still getting #282 , and this could explain it.

Either way, we should probably unify makeSyncRequest() between them anyways, should we not? ActiveSyncCalendar.makeSyncRequest() and ActiveSyncAddressbook.makeSyncRequest() appear to be identical, so they should be shared. Whereas ActiveSync.makeRequest() seems completely different, but I am not sure that it's for a good reason, and it doesn't handle sync status 3 at all.

@NeilRashbrook
Copy link
Collaborator

Is the sync key for the entire account, or specific for a calendar, address book or email account?

Both. The account has a hierarchy sync key, and each folder (a calendar and an address book counts as a folder, as does each email folder of course) also has its own sync key.

Either way, we should probably unify makeSyncRequest() between them anyways, should we not?

We don't have CRTP in JavaScript, so you can't inherit the function into both classes, so you would have to have a global function which accepts what I currently call an ActiveSyncPingable (since it can be Pinged) and performs a sync request against it, and then the classes have a helper function that delegates to the global function.

makeRequest doesn't make Sync requests, which is probably why it's completely different, and its error code is 9, not 3 (ActiveSyncError.ts has a typo on line 100, because I didn't notice where the gap in the numbering was.)

Did you check your calendar.db in case there were duplicated entries?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants