Compress command for IMAP after the authentication.

This commit is contained in:
Burak Kaan Köse
2024-11-30 11:48:05 +01:00
parent 36b8de470a
commit 2bc5be2105

View File

@@ -79,15 +79,11 @@ namespace Wino.Core.Integration
try
{
bool isReconnected = await EnsureConnectedAsync(client);
bool mustDoPostAuthIdentification = false;
if ((isCreatedNew || isReconnected) && client.IsConnected)
{
// Activate supported pre-auth capabilities.
if (client.Capabilities.HasFlag(ImapCapabilities.Compress))
await client.CompressAsync();
// Identify if the server supports ID extension.
// Some servers require it pre-authentication, some post-authentication.
// We'll observe the response here and do it after authentication if needed.
@@ -118,6 +114,9 @@ namespace Wino.Core.Integration
// Activate post-auth capabilities.
if (client.Capabilities.HasFlag(ImapCapabilities.QuickResync))
await client.EnableQuickResyncAsync();
if (client.Capabilities.HasFlag(ImapCapabilities.Compress))
await client.CompressAsync();
}
}
catch (Exception ex)