Skip to content

Commit ec9aaea

Browse files
committed
fix(agentmail): guard permanent, replyAll, and draftInReplyTo with operation checks
1 parent a397994 commit ec9aaea

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

apps/sim/blocks/blocks/agentmail.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -494,11 +494,11 @@ export const AgentMailBlock: BlockConfig = {
494494
rest.inboxId = inboxIdParam
495495
}
496496

497-
if (permanent !== undefined) {
497+
if (operation === 'delete_thread' && permanent !== undefined) {
498498
rest.permanent = permanent === 'true'
499499
}
500500

501-
if (replyAll !== undefined) {
501+
if (operation === 'reply_message' && replyAll !== undefined) {
502502
rest.replyAll = replyAll === 'true'
503503
}
504504

@@ -536,7 +536,7 @@ export const AgentMailBlock: BlockConfig = {
536536
rest.removeLabels = removeLabels
537537
}
538538

539-
if (draftInReplyTo) {
539+
if (operation === 'create_draft' && draftInReplyTo) {
540540
rest.inReplyTo = draftInReplyTo
541541
}
542542

0 commit comments

Comments
 (0)