Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send to all urns #49

Merged
merged 6 commits into from
Jul 10, 2017
Merged

Send to all urns #49

merged 6 commits into from
Jul 10, 2017

Conversation

ericnewcomer
Copy link
Member

Addresses #45

run.AddEvent(step, events.NewSendMsgToContact(run.Contact().UUID(), text, a.Attachments))
urns := run.Contact().URNs()
if a.AllURNs && len(urns) > 0 {
for i := range urns {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This may be a question of how we expect this to work for contacts that have no URNs but I think the more go-ing way of doing this would probably be:

if a.AllURNS {
  for _, urn := range run.Contact().URNS() {
     run.AddEvent(step, events.NewSendMsgToURN(urn, text, a.Attachments))
  }
} else {
...
}

@@ -48,6 +48,16 @@
"text": "Hi @contact.name, are you ready?"
},
{
"uuid": "ac110f56-a66c-4462-921c-b2c6d1c6dadb",
"type": "send_msg",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this means what you think it means. :)

@rowanseymour rowanseymour merged commit a684d99 into master Jul 10, 2017
@rowanseymour rowanseymour deleted the send_all branch July 10, 2017 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants