Skip to content

Commit

Permalink
fix: do not reuse same instance for recipient
Browse files Browse the repository at this point in the history
Existing implementation uses same instance for all recipients, causing all sender/recipients to be the same email that is fetched the last.
  • Loading branch information
byenilmez authored Dec 4, 2023
1 parent 480f825 commit 48f4caf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion office365/outlook/mail/recipient.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@
class Recipient(ClientValue):
"""Represents information about a user in the sending or receiving end of an event, message or group post."""

def __init__(self, email_address=EmailAddress()):
def __init__(self, email_address=None):
"""
:param EmailAddress email_address: The recipient's email address.
"""
if email_address is None:
email_address = EmailAddress()
super(Recipient, self).__init__()
self.emailAddress = email_address

Expand Down

0 comments on commit 48f4caf

Please sign in to comment.