1
0
mirror of https://github.com/Kopano-dev/kopano-ol-extension.git synced 2023-10-10 13:37:40 +02:00

[KOE-17] Small fix to lookup of current user

This commit is contained in:
Patrick Simpson 2017-02-23 17:17:50 +01:00
parent 6daac784c3
commit ce6d62167f

View File

@ -229,16 +229,19 @@ namespace Acacia.Features.Signatures
// Look for the email address. If found, use the account associated with the GAB
using (ISearch<IContactItem> search = gab.Contacts.Search<IContactItem>())
{
search.AddField("urn:schemas:contacts:email1").SetOperation(SearchOperation.Equal, account.SmtpAddress);
search.AddField("urn:schemas:contacts:customerid").SetOperation(SearchOperation.Equal, account.UserName);
IItem result = search.SearchOne();
us = result as IContactItem;
if (result != null && result != us)
result.Dispose();
}
foreach (string signatureName in signatures)
if (us != null)
{
ReplacePlaceholders(gab.ActiveAccount, us, signatureName);
foreach (string signatureName in signatures)
{
ReplacePlaceholders(gab.ActiveAccount, us, signatureName);
}
}
}
catch(Exception e)