mirror of
https://github.com/Kopano-dev/kopano-ol-extension.git
synced 2023-10-10 13:37:40 +02:00
[KOE-116] Fix for cases when GAB is not available
This commit is contained in:
parent
1febd7030e
commit
a8fe76cf12
@ -70,6 +70,9 @@ namespace Acacia.ZPush
|
|||||||
|
|
||||||
public static ContactStringReplacer FromGAB(GABHandler gab, GABUser user)
|
public static ContactStringReplacer FromGAB(GABHandler gab, GABUser user)
|
||||||
{
|
{
|
||||||
|
if (gab?.Contacts == null || user == null)
|
||||||
|
return null;
|
||||||
|
|
||||||
using (ISearch<IContactItem> search = gab.Contacts.Search<IContactItem>())
|
using (ISearch<IContactItem> search = gab.Contacts.Search<IContactItem>())
|
||||||
{
|
{
|
||||||
search.AddField("urn:schemas:contacts:customerid").SetOperation(SearchOperation.Equal, user.UserName);
|
search.AddField("urn:schemas:contacts:customerid").SetOperation(SearchOperation.Equal, user.UserName);
|
||||||
|
Loading…
Reference in New Issue
Block a user