Skip to content

Commit

Permalink
Merge pull request #1161 from nyaruka/remove_match_by_group
Browse files Browse the repository at this point in the history
Remove matching legacy vars against group names for `start_session` and `send_broadcast` actions
  • Loading branch information
rowanseymour authored Feb 13, 2023
2 parents 9944a5f + 5da71bd commit 5fe2cae
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions flows/actions/base.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,6 @@ type otherContactsAction struct {
}

func (a *otherContactsAction) resolveRecipients(run flows.Run, logEvent flows.EventCallback) ([]*assets.GroupReference, []*flows.ContactReference, string, []urns.URN, error) {
groupSet := run.Session().Assets().Groups()

// copy URNs
urnList := make([]urns.URN, 0, len(a.URNs))
urnList = append(urnList, a.URNs...)
Expand Down Expand Up @@ -259,9 +257,6 @@ func (a *otherContactsAction) resolveRecipients(run flows.Run, logEvent flows.Ev
// if variable evaluates to a UUID, we assume it's a contact UUID
contactRefs = append(contactRefs, flows.NewContactReference(flows.ContactUUID(evaluatedLegacyVar), ""))

} else if groupByName := groupSet.FindByName(evaluatedLegacyVar); groupByName != nil {
// next up we look for a group with a matching name
groupRefs = append(groupRefs, groupByName.Reference())
} else {
// next up try it as a URN
urn := urns.URN(evaluatedLegacyVar)
Expand Down

0 comments on commit 5fe2cae

Please sign in to comment.