Skip to content

Commit

Permalink
fix: Don't request new distinguished folders on older Exchange versio…
Browse files Browse the repository at this point in the history
…ns. Fixes #1315
  • Loading branch information
ecederstrand committed Jun 5, 2024
1 parent 2831454 commit c310c65
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions exchangelib/folders/known_folders.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,19 @@ class AllCategorizedItems(WellknownFolder):
class AllContacts(WellknownFolder):
DISTINGUISHED_FOLDER_ID = "allcontacts"
CONTAINER_CLASS = "IPF.Note"
supported_from = EXCHANGE_O365


class AllItems(WellknownFolder):
DISTINGUISHED_FOLDER_ID = "allitems"
CONTAINER_CLASS = "IPF"
supported_from = EXCHANGE_O365


class AllPersonMetadata(WellknownFolder):
DISTINGUISHED_FOLDER_ID = "allpersonmetadata"
CONTAINER_CLASS = "IPF.Note"
supported_from = EXCHANGE_O365


class ArchiveDeletedItems(WellknownFolder):
Expand Down Expand Up @@ -139,6 +142,7 @@ def view(self, *args, **kwargs):
class CompanyContacts(WellknownFolder):
DISTINGUISHED_FOLDER_ID = "companycontacts"
CONTAINER_CLASS = "IPF.Contact.Company"
supported_from = EXCHANGE_O365
supported_item_models = CONTACT_ITEM_CLASSES
LOCALIZED_NAMES = {
"da_DK": ("Firmaer",),
Expand Down Expand Up @@ -233,6 +237,7 @@ class FolderMemberships(Folder):
class FromFavoriteSenders(WellknownFolder):
DISTINGUISHED_FOLDER_ID = "fromfavoritesenders"
CONTAINER_CLASS = "IPF.Note"
supported_from = EXCHANGE_O365
LOCALIZED_NAMES = {
"da_DK": ("Personer jeg kender",),
}
Expand Down Expand Up @@ -263,6 +268,7 @@ class Inbox(WellknownFolder):

class Inference(WellknownFolder):
DISTINGUISHED_FOLDER_ID = "inference"
supported_from = EXCHANGE_O365


class Journal(WellknownFolder):
Expand Down Expand Up @@ -345,6 +351,7 @@ class Outbox(Messages):
class PeopleCentricConversationBuddies(WellknownFolder):
DISTINGUISHED_FOLDER_ID = "peoplecentricconversationbuddies"
CONTAINER_CLASS = "IPF.Contact.PeopleCentricConversationBuddies"
supported_from = EXCHANGE_O365
LOCALIZED_NAMES = {
None: ("PeopleCentricConversation Buddies",),
}
Expand Down Expand Up @@ -400,6 +407,7 @@ class RecipientCache(WellknownFolder):
class RelevantContacts(WellknownFolder):
DISTINGUISHED_FOLDER_ID = "relevantcontacts"
CONTAINER_CLASS = "IPF.Note"
supported_from = EXCHANGE_O365


class RecoverableItemsDeletions(WellknownFolder):
Expand Down Expand Up @@ -456,6 +464,7 @@ class ServerFailures(WellknownFolder):

class SharePointNotifications(WellknownFolder):
DISTINGUISHED_FOLDER_ID = "sharepointnotifications"
supported_from = EXCHANGE_O365


class ShortNotes(WellknownFolder):
Expand Down Expand Up @@ -488,6 +497,7 @@ class Tasks(WellknownFolder):

class TemporarySaves(WellknownFolder):
DISTINGUISHED_FOLDER_ID = "temporarysaves"
supported_from = EXCHANGE_O365


class ToDoSearch(WellknownFolder):
Expand Down

0 comments on commit c310c65

Please sign in to comment.