Skip to content

Commit

Permalink
fix: accept multiple recipients in send_email action
Browse files Browse the repository at this point in the history
  • Loading branch information
danielgrittner committed Aug 22, 2024
1 parent 24be7d4 commit 1378717
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions admyral/actions/send_email.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
)
def send_email(
recipients: Annotated[
str, # TODO: make list again as soon as we improved parameter handling
str | list[str],
ArgumentMetadata(
display_name="Recipients",
description="The email addresses of the recipients",
Expand Down Expand Up @@ -48,7 +48,7 @@ def send_email(

body = {
"from": f"{sender_name} <{RESEND_EMAIL}>",
"to": [recipients], # TODO: remove list construction here
"to": [recipients] if isinstance(recipients, str) else recipients,
"subject": subject,
"text": body,
}
Expand Down

0 comments on commit 1378717

Please sign in to comment.