OUT-471: Added SQL query to hide messages with "pep-auto-consume" in TRANSPORT_MESSAGE_HEADERS OUT-471
authornikolaj
Thu, 12 Jul 2018 18:14:31 +0200
branchOUT-471
changeset 22895892f184a8ac
parent 2288 f8d4e72e617f
OUT-471: Added SQL query to hide messages with "pep-auto-consume" in TRANSPORT_MESSAGE_HEADERS
ThisAddIn.cs
     1.1 --- a/ThisAddIn.cs	Wed Jul 11 15:28:31 2018 +0200
     1.2 +++ b/ThisAddIn.cs	Thu Jul 12 18:14:31 2018 +0200
     1.3 @@ -2213,7 +2213,7 @@
     1.4                                      }
     1.5  
     1.6                                      // Set the filter
     1.7 -                                    if (account.AccountType == Outlook.OlAccountType.olImap)
     1.8 +                                    if (account.AccountType == Outlook.OlAccountType.olImap && Globals.OutlookVersion != Globals.Version.Outlook2010)
     1.9                                      {
    1.10                                          // (1) Hide any deleted IMAP items http://schemas.microsoft.com/mapi/id/{00062008-0000-0000-C000-000000000046}/85700003 = 0
    1.11                                          // (2) Hide 'pEp internal' category items
    1.12 @@ -2221,6 +2221,14 @@
    1.13                                                        " AND " +
    1.14                                                        "\"urn:schemas-microsoft-com:office:office#Keywords\" <> '" + Globals.PEP_INTERNAL_CATEGORY_NAME + "')";
    1.15                                      }
    1.16 +
    1.17 +                                    // OUT-471 Additional SQL query to hide messages with "pep-auto-consume" in TRANSPORT_MESSAGE_HEADERS
    1.18 +                                    else if (account.AccountType == Outlook.OlAccountType.olImap && Globals.OutlookVersion == Globals.Version.Outlook2010)
    1.19 +                                    {
    1.20 +                                        view.Filter = "NOT (\"http://schemas.microsoft.com/mapi/proptag/0x007D001F\" LIKE '%pep-auto-consume%') AND (\"" + MapiProperty.PidLidImapMarkedForDeletion.DaslName + "\" = 0" +
    1.21 +                                                      " AND " +
    1.22 +                                                      "\"urn:schemas-microsoft-com:office:office#Keywords\" <> '" + Globals.PEP_INTERNAL_CATEGORY_NAME + "')";
    1.23 +                                    }
    1.24                                      else
    1.25                                      {
    1.26                                          // Hide 'pEp internal' category items