Prevent downloading existing messages for Outlook.

This commit is contained in:
Burak Kaan Köse
2024-05-25 17:00:52 +02:00
parent b66557f3be
commit 23d0eeab16
7 changed files with 64 additions and 18 deletions

View File

@@ -77,5 +77,13 @@ namespace Wino.Core.Domain.Interfaces
/// <param name="uniqueMailId">Unique id of the mail item.</param>
/// <returns>Account that mail belongs to.</returns>
Task<MailAccount> GetMailAccountByUniqueIdAsync(Guid uniqueMailId);
/// <summary>
/// Checks whether the given mail copy id exists in the database.
/// Safely used for Outlook to prevent downloading the same mail twice.
/// For Gmail, it should be avoided since one mail may belong to multiple folders.
/// </summary>
/// <param name="mailCopyId">Native mail id of the message.</param>
Task<bool> IsMailExistsAsync(string mailCopyId);
}
}