We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a8cd1f3 commit ff3b120Copy full SHA for ff3b120
nylas/resources/messages.py
@@ -170,7 +170,11 @@ def send(
170
json_body = None
171
172
# From is a reserved keyword in Python, so we need to pull the data from 'from_' instead
173
- request_body["from"] = request_body.get("from_", None)
+ # Handle both dictionary-style "from" and typed "from_" field
174
+ if "from_" in request_body and "from" not in request_body:
175
+ request_body["from"] = request_body["from_"]
176
+ del request_body["from_"]
177
+ # If "from" already exists, leave it unchanged
178
179
# Use form data only if the attachment size is greater than 3mb
180
attachment_size = sum(
0 commit comments