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:
parent
6daac784c3
commit
ce6d62167f
@ -229,18 +229,21 @@ namespace Acacia.Features.Signatures
|
|||||||
// Look for the email address. If found, use the account associated with the GAB
|
// Look for the email address. If found, use the account associated with the GAB
|
||||||
using (ISearch<IContactItem> search = gab.Contacts.Search<IContactItem>())
|
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();
|
IItem result = search.SearchOne();
|
||||||
us = result as IContactItem;
|
us = result as IContactItem;
|
||||||
if (result != null && result != us)
|
if (result != null && result != us)
|
||||||
result.Dispose();
|
result.Dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (us != null)
|
||||||
|
{
|
||||||
foreach (string signatureName in signatures)
|
foreach (string signatureName in signatures)
|
||||||
{
|
{
|
||||||
ReplacePlaceholders(gab.ActiveAccount, us, signatureName);
|
ReplacePlaceholders(gab.ActiveAccount, us, signatureName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
catch(Exception e)
|
catch(Exception e)
|
||||||
{
|
{
|
||||||
Logger.Instance.Error(this, "Exception in ReplacePlaceholders: {0}", e);
|
Logger.Instance.Error(this, "Exception in ReplacePlaceholders: {0}", e);
|
||||||
|
Loading…
Reference in New Issue
Block a user