Skip to content

Commit

Permalink
Add missing fields to Meeting* items
Browse files Browse the repository at this point in the history
  • Loading branch information
ecederstrand committed Jan 28, 2022
1 parent 08b6dd4 commit 33f015f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ Change Log

HEAD
----
- Fixed field name to match API: `BaseReplyItem.received_by_representing` to
- `BaseReplyItem.received_representing`
- Added fields `received_by` and `received_representing` to `MeetingRequest`,
- `MeetingMessage` and `MeetingCancellation`


4.7.1
Expand Down
2 changes: 1 addition & 1 deletion exchangelib/items/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ class BaseReplyItem(EWSElement, metaclass=EWSMeta):
reference_item_id = EWSElementField(value_cls=ReferenceItemId)
new_body = BodyField(field_uri="NewBodyContent") # Accepts and returns Body or HTMLBody instances
received_by = MailboxField(field_uri="ReceivedBy", supported_from=EXCHANGE_2007_SP1)
received_by_representing = MailboxField(field_uri="ReceivedRepresenting", supported_from=EXCHANGE_2007_SP1)
received_representing = MailboxField(field_uri="ReceivedRepresenting", supported_from=EXCHANGE_2007_SP1)

__slots__ = ("account",)

Expand Down
6 changes: 2 additions & 4 deletions exchangelib/items/calendar_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,10 +317,10 @@ class BaseMeetingItem(Item, metaclass=EWSMeta):

effective_rights_idx = Item.FIELDS.index_by_name("effective_rights")
sender_idx = Message.FIELDS.index_by_name("sender")
reply_to_idx = Message.FIELDS.index_by_name("reply_to")
received_representing_idx = Message.FIELDS.index_by_name("received_representing")
FIELDS = (
Item.FIELDS[:effective_rights_idx]
+ Message.FIELDS[sender_idx : reply_to_idx + 1]
+ Message.FIELDS[sender_idx : received_representing_idx + 1]
+ Item.FIELDS[effective_rights_idx:]
)

Expand Down Expand Up @@ -371,8 +371,6 @@ class MeetingResponse(BaseMeetingItem):

ELEMENT_NAME = "MeetingResponse"

received_by = MailboxField(field_uri="message:ReceivedBy", is_read_only=True)
received_representing = MailboxField(field_uri="message:ReceivedRepresenting", is_read_only=True)
proposed_start = DateTimeField(field_uri="meeting:ProposedStart", supported_from=EXCHANGE_2013)
proposed_end = DateTimeField(field_uri="meeting:ProposedEnd", supported_from=EXCHANGE_2013)

Expand Down

0 comments on commit 33f015f

Please sign in to comment.