Skip to content

fix(activesync): skip GAL contacts calls when Turba is absent#202

Open
TDannhauer wants to merge 1 commit into
FRAMEWORK_6_0from
fix/activesync-gal-without-turba
Open

fix(activesync): skip GAL contacts calls when Turba is absent#202
TDannhauer wants to merge 1 commit into
FRAMEWORK_6_0from
fix/activesync-gal-without-turba

Conversation

@TDannhauer

Copy link
Copy Markdown
Contributor

Summary

  • Stop ActiveSync from calling contacts/getGalUid (and related contacts APIs) when no contacts provider such as Turba is installed.
  • Add unit coverage for the no-Turba path.

Motivation

On mail-only Horde installs, IMP still registers contacts/favouriteRecipients. That makes $registry->contacts succeed via listAPIs(), but contacts/getGalUid is not registered. ActiveSync then logs:

The method "contacts/getGalUid" is not defined in the Horde Registry.

This can happen even when the client has contacts sync disabled (e.g. Gmail), because ResolveRecipients / GAL helpers still probe the GAL.

Changes

  • contacts_getGal(): check hasMethod('contacts/getGalUid') before calling; cache with isset.
  • contacts_search() / resolveRecipient(): return empty results when hasInterface('contacts') is false.
  • New unit tests in ConnectorContactsGetGalTest.

Test plan

  • Unit tests: ConnectorContactsGetGalTest
  • ActiveSync mail sync without Turba: no contacts/getGalUid ERR in logs
  • With Turba + GAL configured: GAL / ResolveRecipients still work

IMP advertises contacts/favouriteRecipients, so listAPIs() includes
"contacts" even without a full contacts provider. Guard getGalUid,
search, and ResolveRecipients so mail-only ActiveSync installs do not
throw Horde_Exception.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant