Skip to content

Commit

Permalink
Mark some distinguished folders with supported_from based on feedback…
Browse files Browse the repository at this point in the history
… in #1301
  • Loading branch information
Erik Cederstrand committed May 8, 2024
1 parent 6ed6617 commit be0cd9f
Showing 1 changed file with 19 additions and 8 deletions.
27 changes: 19 additions & 8 deletions exchangelib/folders/known_folders.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
Task,
)
from ..properties import EWSMeta
from ..version import EXCHANGE_2010_SP1, EXCHANGE_2013, EXCHANGE_2013_SP1
from ..version import EXCHANGE_2010_SP1, EXCHANGE_2013, EXCHANGE_2013_SP1, EXCHANGE_O365
from .base import Folder
from .collections import FolderCollection

Expand Down Expand Up @@ -228,6 +228,7 @@ class AllItems(WellknownFolder):
class AllCategorizedItems(WellknownFolder):
DISTINGUISHED_FOLDER_ID = "allcategorizeditems"
CONTAINER_CLASS = "IPF.Note"
supported_from = EXCHANGE_O365


class AllPersonMetadata(WellknownFolder):
Expand Down Expand Up @@ -297,11 +298,12 @@ class Directory(WellknownFolder):
class DlpPolicyEvaluation(WellknownFolder):
DISTINGUISHED_FOLDER_ID = "dlppolicyevaluation"
CONTAINER_CLASS = "IPF.StoreItem.DlpPolicyEvaluation"
supported_from = EXCHANGE_O365


class Favorites(WellknownFolder):
CONTAINER_CLASS = "IPF.Note"
DISTINGUISHED_FOLDER_ID = "favorites"
CONTAINER_CLASS = "IPF.Note"
supported_from = EXCHANGE_2013


Expand All @@ -313,16 +315,16 @@ class FolderMemberships(Folder):


class FromFavoriteSenders(WellknownFolder):
CONTAINER_CLASS = "IPF.Note"
DISTINGUISHED_FOLDER_ID = "fromfavoritesenders"
CONTAINER_CLASS = "IPF.Note"
LOCALIZED_NAMES = {
"da_DK": ("Personer jeg kender",),
}


class IMContactList(WellknownFolder):
CONTAINER_CLASS = "IPF.Contact.MOC.ImContactList"
DISTINGUISHED_FOLDER_ID = "imcontactlist"
CONTAINER_CLASS = "IPF.Contact.MOC.ImContactList"
supported_from = EXCHANGE_2013


Expand Down Expand Up @@ -367,6 +369,7 @@ class Notes(WellknownFolder):

class OneNotePagePreviews(WellknownFolder):
DISTINGUISHED_FOLDER_ID = "onenotepagepreviews"
supported_from = EXCHANGE_O365


class PeopleCentricConversationBuddies(WellknownFolder):
Expand All @@ -384,31 +387,37 @@ class PeopleConnect(WellknownFolder):

class QedcDefaultRetention(WellknownFolder):
DISTINGUISHED_FOLDER_ID = "qedcdefaultretention"
supported_from = EXCHANGE_O365


class QedcLongRetention(WellknownFolder):
DISTINGUISHED_FOLDER_ID = "qedclongretention"
supported_from = EXCHANGE_O365


class QedcMediumRetention(WellknownFolder):
DISTINGUISHED_FOLDER_ID = "qedcmediumretention"
supported_from = EXCHANGE_O365


class QedcShortRetention(WellknownFolder):
DISTINGUISHED_FOLDER_ID = "qedcshortretention"
supported_from = EXCHANGE_O365


class QuarantinedEmail(WellknownFolder):
DISTINGUISHED_FOLDER_ID = "quarantinedemail"
supported_from = EXCHANGE_O365


class QuarantinedEmailDefaultCategory(WellknownFolder):
DISTINGUISHED_FOLDER_ID = "quarantinedemaildefaultcategory"
supported_from = EXCHANGE_O365


class QuickContacts(WellknownFolder):
CONTAINER_CLASS = "IPF.Contact.MOC.QuickContacts"
DISTINGUISHED_FOLDER_ID = "quickcontacts"
CONTAINER_CLASS = "IPF.Contact.MOC.QuickContacts"
supported_from = EXCHANGE_2013


Expand Down Expand Up @@ -446,7 +455,7 @@ class RecoverableItemsRoot(WellknownFolder):

class RecoverableItemsSubstrateHolds(WellknownFolder):
DISTINGUISHED_FOLDER_ID = "recoverableitemssubstrateholds"
supported_from = EXCHANGE_2010_SP1
supported_from = EXCHANGE_O365
LOCALIZED_NAMES = {
None: ("SubstrateHolds",),
}
Expand All @@ -472,6 +481,7 @@ class SharePointNotifications(WellknownFolder):

class ShortNotes(WellknownFolder):
DISTINGUISHED_FOLDER_ID = "shortnotes"
supported_from = EXCHANGE_O365


class SyncIssues(WellknownFolder):
Expand All @@ -485,17 +495,18 @@ class TemporarySaves(WellknownFolder):


class ToDoSearch(WellknownFolder):
CONTAINER_CLASS = "IPF.Task"
DISTINGUISHED_FOLDER_ID = "todosearch"
CONTAINER_CLASS = "IPF.Task"
supported_from = EXCHANGE_2013
LOCALIZED_NAMES = {
None: ("To-Do Search",),
}


class UserCuratedContacts(WellknownFolder):
CONTAINER_CLASS = "IPF.Note"
DISTINGUISHED_FOLDER_ID = "usercuratedcontacts"
CONTAINER_CLASS = "IPF.Note"
supported_from = EXCHANGE_O365


class VoiceMail(WellknownFolder):
Expand Down

0 comments on commit be0cd9f

Please sign in to comment.