Skip to content

Commit

Permalink
Merge pull request #2 from kamikazechaser/sohail/at-service-code
Browse files Browse the repository at this point in the history
fix: (AT) pass dial value as AT serviceCode
  • Loading branch information
zikani03 authored Jul 5, 2022
2 parents 40288b1 + e69382c commit 0ca596c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions dialoguss.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ type Session struct {
PhoneNumber string `yaml:"phoneNumber"`
Description string `yaml:"description"`
Steps []*Step `yaml:"steps"`
serviceCode string
url string
client *http.Client
ApiType string
Expand Down Expand Up @@ -116,6 +117,7 @@ func NewInteractiveSession(d DialogussConfig) *Session {
PhoneNumber: d.PhoneNumber,
Description: "Interactive Session",
Steps: nil,
serviceCode: d.Dial,
url: d.URL,
client: &http.Client{},
ApiType: apiType,
Expand Down
1 change: 1 addition & 0 deletions dialoguss_africastalking.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ func (s *Step) ExecuteAsAfricasTalking(session *Session) (string, error) {
data := url.Values{}
data.Set("sessionId", session.ID)
data.Set("phoneNumber", session.PhoneNumber)
data.Set("serviceCode", session.serviceCode)
var text = s.Text
if &text == nil {
return "", errors.New("Input Text cannot be nil")
Expand Down

0 comments on commit 0ca596c

Please sign in to comment.