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

[KOE-168] Disabling local resolving for send-as

This commit is contained in:
Patrick Simpson 2018-03-19 14:57:11 +02:00
parent e81cb03281
commit 0e004b7937

View File

@ -121,9 +121,20 @@ namespace Acacia.Features.SendAs
}
private static readonly BoolOption OPTION_GAB_LOOKUP = new BoolOption("GABLookup", true);
[AcaciaOption("Enables local resolving look ups for senders. This is disabled by default, as it seems " +
"local contacts may lead to wrong senders.")]
public bool ResolveLocal
{
get { return GetOption(OPTION_RESOLVE_LOCAL); }
set { SetOption(OPTION_RESOLVE_LOCAL, value); }
}
private static readonly BoolOption OPTION_RESOLVE_LOCAL = new BoolOption("ResolveLocal", false);
internal IRecipient FindSendAsSender(ZPushAccount zpush, GABUser user)
{
// First try a simple resolve, this will work if the username is unique
if (ResolveLocal)
{
IRecipient recip = ThisAddIn.Instance.ResolveRecipient(user.UserName);
if (recip != null)
{
@ -139,6 +150,7 @@ namespace Acacia.Features.SendAs
recip.Dispose();
}
}
}
// Search through GAB to find the user
if (GABLookup)