-
Notifications
You must be signed in to change notification settings - Fork 442
Description
I'm looping through messages in mailbox and fetching event data for EventMessages like this:
for message in mailbox.get_messages():
if message.is_event_message:
event = message.get_event()
print(f"Organizer: {event.organizer}")
print(f"Start: {event.start}")
print(f"End: {event.end}")
print(f"Subject: {event.subject}")
print(f"Attendees: {event.attendees}")
I'm expecting to see the event start and end times as well as the attendees etc. However, I'm only getting the event subject and nothing else:
Organizer:
Start: None
End: None
Subject: My event subject
Attendees: Attendees Count: 0
Looking at the code in message.py I think there's a bug on row 1038:
# select a dummy field (eg. subject) to avoid pull unneccesary data
query = self.q().select('subject').expand('event')
As the select('subject') restricts the fields fetched from the API and thus only the subject field contains data.
I tested removing the select('subject') from the row and got the expected results with attendees, start and end times etc:
Organizer: Antti Heikkilä
Start: 2021-09-10 12:30:00+00:00
End: 2021-09-10 13:00:00+00:00
Subject: My event subject
Attendees: Attendees Count: 2