Skip to content
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

Pseudo-addressbook IDs for special addressbooks and autocomplete #397

Open
mstilkerich opened this issue Sep 4, 2022 · 0 comments
Open

Comments

@mstilkerich
Copy link
Owner

Currently, RCMCardDAV registers all CardDAV addressbooks of the user as autocompletion sources with roundcube. If the admin has configured CardDAV addressbooks also for the special addressbooks collected senders / receivers, these are also registered by their ID. For this reason, rcmcarddav issues database requests on every initialization. However, for most roundcube requests, none of these addressbooks will be used.

We could avoid this if we registers with roundcube using pseudo IDs, e.g. carddav_autocomplete, and postponed the lookup until roundcube requests a carddav addressbook by that ID.

The following comes to mind that must be considered:

  • Without reading the addressbooks from the DB, we will only recognize issues in the admin configuration concerning the special addressbooks after the addressbook sources are requested (e.g., no matching addressbook found). Now, we found notice such issues only when roundcube already requests the addressbook. The behavior in case of problems would probably have to deviate from what we do now (which is, leave the roundcube setting of collected sender/receiver untouched in case we cannot find the configured carddav addressbook).
  • The pseudo addressbooks should not appear in the contacts view. We will have to check if roundcube provides a mechanism for this (there appears to be a hidden flag similar to the readonly when we list the addressbooks, or maybe we can simply omit the pseudo addressbooks from the list).
  • For the autocomplete addressbook, we will have to provide a way for an Addressbook object to service multiple IDs, as currently all carddav addressbooks of the user are registered for autocompletion. This should be fairly simple and will further reduce the amount of DB requests issued in case of autocompletion, since currently, when multiple carddav addressbooks are configured for autocompletion, they will be queried sequentially.
@mstilkerich mstilkerich added this to the 5.1.0 milestone Sep 4, 2022
@mstilkerich mstilkerich removed this from the 5.1.0 milestone Aug 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant