From 2bc5be21054ac1ad999af1b2f5a2f6e32f35b909 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Burak=20Kaan=20K=C3=B6se?= Date: Sat, 30 Nov 2024 11:48:05 +0100 Subject: [PATCH] Compress command for IMAP after the authentication. --- Wino.Core/Integration/ImapClientPool.cs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Wino.Core/Integration/ImapClientPool.cs b/Wino.Core/Integration/ImapClientPool.cs index 500f433f..b31ff6d2 100644 --- a/Wino.Core/Integration/ImapClientPool.cs +++ b/Wino.Core/Integration/ImapClientPool.cs @@ -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)