Skip to content

Commit

Permalink
Merge pull request #6 from istresearch/develop
Browse files Browse the repository at this point in the history
Release v0.94.2-2
  • Loading branch information
jeremyist authored Jan 26, 2021
2 parents 8a4f4ce + f088575 commit 161d4f6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions flows/actions/send_msg.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ type SendMsgAction struct {
AllURNs bool `json:"all_urns,omitempty"`
Templating *Templating `json:"templating,omitempty" validate:"omitempty,dive"`
Topic flows.MsgTopic `json:"topic,omitempty" validate:"omitempty,msg_topic"`
Labels []*assets.LabelReference `json:"labels,omitempty" validate:"omitempty,dive"`
}

// Templating represents the templating that should be used if possible
Expand Down Expand Up @@ -123,6 +124,7 @@ func (a *SendMsgAction) Execute(run flows.FlowRun, step flows.Step, logModifier
}

msg := flows.NewMsgOut(dest.URN.URN(), channelRef, evaluatedText, evaluatedAttachments, evaluatedQuickReplies, templating, a.Topic)
msg.Labels = a.Labels
logEvent(events.NewMsgCreated(msg))
}

Expand Down
1 change: 1 addition & 0 deletions flows/inspect/templates_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ func TestTemplatePaths(t *testing.T) {
"$.nodes[*].actions[@.type=\"send_email\"].body",
"$.nodes[*].actions[@.type=\"send_email\"].subject",
"$.nodes[*].actions[@.type=\"send_msg\"].attachments[*]",
"$.nodes[*].actions[@.type=\"send_msg\"].labels[*].name_match",
"$.nodes[*].actions[@.type=\"send_msg\"].quick_replies[*]",
"$.nodes[*].actions[@.type=\"send_msg\"].templating.variables[*]",
"$.nodes[*].actions[@.type=\"send_msg\"].text",
Expand Down
1 change: 1 addition & 0 deletions flows/msg.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ type MsgOut struct {
Templating_ *MsgTemplating `json:"templating,omitempty"`
Topic_ MsgTopic `json:"topic,omitempty"`
TextLanguage envs.Language `json:"text_language,omitempty"`
Labels []*assets.LabelReference `json:"labels,omitempty"`
}

// NewMsgIn creates a new incoming message
Expand Down

0 comments on commit 161d4f6

Please sign in to comment.