Add activity focused selector api - #63026
Conversation
…ty selector This allows applications to register a class to extend the query for focused activity. Focused activity events should directly concern the logged-in user. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
ee18089 to
e66e033
Compare
It will show any event linked to a calendar directly owned by the logged-in user. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
e66e033 to
fbb2244
Compare
ChristophWurst
left a comment
There was a problem hiding this comment.
Maybe I don't get the full picture. Where would that be used?
ChristophWurst
left a comment
There was a problem hiding this comment.
forgot to save this comment in my review yesterday
| $query->expr()->andX( | ||
| $query->expr()->eq('a.object_type', $query->createNamedParameter('calendar')), | ||
| $query->expr()->eq('a.object_id', 'calendars.id'), | ||
| )); |
There was a problem hiding this comment.
so a is the oc_activities table?
This feels a bit like we are leaking schema internals of the db layer into the public API for other apps. That's hard to understand (for me) and changes of the base query/schema could be painful in the future.
There was a problem hiding this comment.
So if I am reading this correctly, you want to build a SQL statement from bits of SQL statements collected from separately maintained apps with a type enforcement of list"string" and no way to control the join statements?
Respectfully: I think this is a bad idea
Summary
Adds an API for application to register an activity focused selector to extend the DB query for "focused" activity filter.
Implements the API in dav for calendar events as an example.
Checklist
3. to review, feature component)stable32)AI (if applicable)