Skip to content

Commit

Permalink
Merge pull request #90 from communityconnectlabs/feat/opt-back-in
Browse files Browse the repository at this point in the history
Avoid starting trigger with the contact stopped on soft opt-out
  • Loading branch information
teehamaral authored Dec 27, 2024
2 parents 75c6b78 + 3e9b8b2 commit 5669eb0
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions core/tasks/handler/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -620,6 +620,17 @@ func handleMsgEvent(ctx context.Context, rt *runtime.Runtime, event *MsgEvent, s
if err != nil {
return errors.Wrapf(err, "error creating flow contact")
}

msgIn := flows.NewMsgIn(event.MsgUUID, event.URN, channel.ChannelReference(), event.Text, event.Attachments)
msgIn.SetExternalID(string(event.MsgExternalID))
msgIn.SetID(event.MsgID)

err = handleAsInbox(ctx, rt, oa, contact, msgIn, topupID, nil)
if err != nil {
return errors.Wrapf(err, "error handling inbox message")
}
return nil

}
}

Expand Down

0 comments on commit 5669eb0

Please sign in to comment.