Getting FreeBusy for attendees while autocompleting them


I’m looking into how to extend the calendar app to be aware of who’s busy while inviting them as attendees to an event.

To my understanding, on the client-side, that means the AutoCompletionService requests all the user’s contacts that match with what’s already typed in. I would like to be able to draw a strikethrough on all the contacts which are busy at the time the event is scheduled for.

The gist of it is that, as I understand it, the best way to do this for the AutoCompletionService would be to extend the server’s AttendeeController to include information for which users are busy at this time.
This is the point where I get stuck - While I can get an array of contacts, I can’t find a way in nextcloud’s server API to say whether these users are busy.

While the CalendarManager can be used to search for whether the user has any events at that time, I’m not sure how I’d use it for other contacts (assuming there even is a User that corresponds to that user).

The only alternative I can see is for the client to craft a FreeBusy request for all the matching users and send that, instead.

Are there any alternatives that I’m missing?