-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Carefully filter out non matching time ranges for CalDAV search #30048
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
Carefully filter out non matching time ranges for CalDAV search #30048
Conversation
miaulalala
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Could you please also test and try to break this? It's some critical code :) |
c341375 to
b88c1c9
Compare
|
Tested it, works as expected! |
b88c1c9 to
2e8cf44
Compare
|
/backport to stable23 |
st3iny
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and works.
2e8cf44 to
454f27c
Compare
This comment has been minimized.
This comment has been minimized.
454f27c to
97797a2
Compare
When we search for CalDAV objects in the DB we take the first and last occurence into account. For recurring events that is when they take place the very first time and the very last time. Searching in a more specific time range will still match this condition, because the recurring event starts before the end of the requested range but ends after the start of the requested range. Sabre has filters for this. If we apply them on all seach objects of a search with a time range, then only the recurring events actually taking place at the time of the requested time range will be returned. Signed-off-by: Christoph Wurst <[email protected]>
97797a2 to
b005846
Compare
|
Merge? |
When we search for CalDAV objects in the DB we take the first and last
occurrence into account. For recurring events that is when they take
place the very first time and the very last time. Searching in a more
specific time range will still match this condition, because the
recurring event starts before the end of the requested range but ends
after the start of the requested range.
Sabre has filters for this. If we apply them on all search objects of a
search with a time range, then only the recurring events actually taking
place at the time of the requested time range will be returned.
Fixes nextcloud/calendar#3781