mirror of
https://github.com/Kopano-dev/kopano-ol-extension.git
synced 2023-10-10 13:37:40 +02:00
More debug options
This commit is contained in:
parent
af9abbe196
commit
112a7cf26a
@ -118,6 +118,15 @@ namespace Acacia.Features.GAB
|
||||
}
|
||||
private static readonly BoolOption OPTION_PROCESS_MESSAGE = new BoolOption("ProcessMessage", true);
|
||||
|
||||
[AcaciaOption("If disabled, existing contacts are not deleted when a chunk is processed. " +
|
||||
"This should only be disabled for debug purposes.")]
|
||||
public bool ProcessMessageDeleteExisting
|
||||
{
|
||||
get { return GetOption(OPTION_PROCESS_MESSAGE_DELETE_EXISTING); }
|
||||
set { SetOption(OPTION_PROCESS_MESSAGE_DELETE_EXISTING, value); }
|
||||
}
|
||||
private static readonly BoolOption OPTION_PROCESS_MESSAGE_DELETE_EXISTING = new BoolOption("ProcessMessageDeleteExisting", true);
|
||||
|
||||
[AcaciaOption("If disabled, contacts are not created from incoming GAB messages. " +
|
||||
"This should only be disabled for debug purposes.")]
|
||||
public bool CreateContacts
|
||||
|
@ -267,6 +267,8 @@ namespace Acacia.Features.GAB
|
||||
Logger.Instance.Trace(this, "Processing: {0} - {1} - {2}", item.Subject, item.Location, lastProcessed);
|
||||
_feature?.BeginProcessing();
|
||||
try
|
||||
{
|
||||
if (_feature.ProcessMessageDeleteExisting)
|
||||
{
|
||||
// Delete the old contacts from this chunk
|
||||
using (ISearch<IItem> search = Contacts.Search<IItem>())
|
||||
@ -283,6 +285,7 @@ namespace Acacia.Features.GAB
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Create the new contacts
|
||||
ProcessChunkBody(item, index);
|
||||
|
Loading…
x
Reference in New Issue
Block a user