Skip to content

Commit

Permalink
feat: add cta into flow_message
Browse files Browse the repository at this point in the history
  • Loading branch information
paulobernardoaf committed Sep 4, 2024
1 parent 97c6de0 commit 17177e3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
5 changes: 3 additions & 2 deletions flows/actions/send_wpp_message.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,10 @@ func (a *SendWppMsgAction) Execute(run flows.FlowRun, step flows.Step, logModifi
}

flowMessage = flows.FlowMessage{
FlowID: evaluatedFlowID,
FlowData: a.FlowData,
FlowID: evaluatedFlowID,
FlowData: evaluatedFlowData,
FlowScreen: evaluatedFlowScreen,
FlowCTA: evaluatedButtonText,
}
}

Expand Down
3 changes: 2 additions & 1 deletion flows/actions/testdata/send_whatsapp_msg.json
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,8 @@
"flow_screen": "WELCOME_SCREEN",
"flow_data": {
"name": "John Doe"
}
},
"flow_cta": "Button text"
}
}
}
Expand Down
1 change: 1 addition & 0 deletions flows/msg_wpp.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ type FlowMessage struct {
FlowID string `json:"flow_id,omitempty"`
FlowData FlowData `json:"flow_data,omitempty"`
FlowScreen string `json:"flow_screen,omitempty"`
FlowCTA string `json:"flow_cta,omitempty"`
}

type ListItems struct {
Expand Down

0 comments on commit 17177e3

Please sign in to comment.