-
-
Notifications
You must be signed in to change notification settings - Fork 80
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
Homesets are not "personal" when they are detected two times (1x personal, 1x non-personal) #847
Comments
I think it should be possible to consequently query URLs only once.
However I'm afraid that it won't be possible "easily". Maybe it's a good time to further refactor the @sunkup Can you start with reproducing the issue? And then see how a solution could look like. |
I can reproduce and confirm the problem. A very simple solution could be to insert the homeset only if it does not exist already. That works as expected for me. val existing = homeSetRepository.getByHomesetUrl(service.id, resolvedHomeSetUrl.toString()) != null
if (!existing) {
logger.fine("Homeset ${service.id}/$resolvedHomeSetUrl does not exist; inserting now")
homeSetRepository.insertOrUpdateByUrl(
HomeSet(0, service.id, personal, resolvedHomeSetUrl)
)
} else
logger.fine("Homeset ${service.id}/$resolvedHomeSetUrl exists already; not updating") |
But would that work in the case that:
I think the basic approach should work, but maybe |
True, when checking against the database we won't update the homesets anymore at all! We would only want to check whether they have been fetched already, as you say. if (!alreadyFetched.contains(resolvedHomeSetUrl)) {
homeSetRepository.insertOrUpdateByUrl(
HomeSet(0, service.id, personal, resolvedHomeSetUrl)
)
alreadyFetched += resolvedHomeSetUrl
} |
Problem scope
App version
Android version and device/firmware type
No response
Steps to reproduce
Create a DAVx5 account with a service that lists home-sets under multiple principals (e.g. mailbox.org). URL hierarchy:
Actual result
DAVx5 queries the group principals, which again contain the /carddav / /caldav homeset. So the homeset is first detected as personal homeset (directly within the user principal), but then overwritten as non-personal homeset (from the group principals).
Expected result
If a home-set is detected as both personal and non-personal, it should be treated as personal.
Further info
No response
The text was updated successfully, but these errors were encountered: