-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
fix(dav): Make current ooo info time-dependent #41962
Conversation
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.
This will break the option for clients or potential admin features in the feature to show OOO in the form, etc.
Please let's not do this 🙈
We should check the applicable time in talk, it's on the way.
OOF. But the endpoint was specifically designed to only return data if it's currently active. Do we need two endpoints? |
Docs don't mention this:
So
I would say no, a simple date check on the returned date easily tells if it's applicable or not? const now = new Date()
const firstDay = new Date(absence.firstDay)
const lastDay = new Date(absence.lastDay)
return (now > firstDay && now < lastDay) |
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, works as expected, returning 404, if OoO is not in the effect yet (or expired)
Also wanted to ask about second endpoint. I understand that it might be useful for clients to get that data beforehand, but that's not the general case, I'd say
This comment was marked as outdated.
This comment was marked as outdated.
No, it's not, because you don't know the timezone of the other user. Pushed another version. The old endpoint to get the absence data independent of time is back. In addition there is a timezone-aware endpoint that only returns data if the absence happens right now. |
|
API changed another time for the new return type. Please let me know if it's usable. Edit: give me 3mins. Forgot something. |
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.
OpenAPI looks good
/backport to stable28 |
🏓 on the failing linters, see @nickvergessen's comments |
OpenAPI needs rebuild 🙈 |
* If there is an out of office absence info and it happens now -> return data * Else: return no data Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
419d6ed
to
9a206c6
Compare
CI is happy now. @nickvergessen are you, too? |
Summary
Checklist