From 53e29a1d1fd54a6782924e89904fb04581331d1a Mon Sep 17 00:00:00 2001
From: Patrick Simpson
Date: Tue, 26 Sep 2017 17:33:26 +0200
Subject: [PATCH] [KOE-116] Fix for cases when GAB is not available
---
.../AcaciaZPushPlugin/ZPush/ContactStringReplacer.cs | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/AcaciaZPushPlugin/AcaciaZPushPlugin/ZPush/ContactStringReplacer.cs b/src/AcaciaZPushPlugin/AcaciaZPushPlugin/ZPush/ContactStringReplacer.cs
index 1c4e6de..f0d0532 100644
--- a/src/AcaciaZPushPlugin/AcaciaZPushPlugin/ZPush/ContactStringReplacer.cs
+++ b/src/AcaciaZPushPlugin/AcaciaZPushPlugin/ZPush/ContactStringReplacer.cs
@@ -70,6 +70,9 @@ namespace Acacia.ZPush
public static ContactStringReplacer FromGAB(GABHandler gab, GABUser user)
{
+ if (gab?.Contacts == null || user == null)
+ return null;
+
using (ISearch search = gab.Contacts.Search())
{
search.AddField("urn:schemas:contacts:customerid").SetOperation(SearchOperation.Equal, user.UserName);