Skip to content

Commit

Permalink
Merge 3049d21 into 39b3981
Browse files Browse the repository at this point in the history
  • Loading branch information
cosminrentea committed Apr 17, 2017
2 parents 39b3981 + 3049d21 commit d9756f7
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions server/sms/nexmo_sms_sender.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ type NexmoMessageReport struct {
}

type ReportPayload struct {
OrderId int `json:"order_id"`
OrderId string `json:"order_id,omitempty"`
MessageId string `json:"message_id"`
SmsText string `json:"sms_text"`
SmsRequestTime string `json:"sms_request_time"`
Expand Down Expand Up @@ -188,11 +188,6 @@ func (ns *NexmoSender) Send(msg *protocol.Message) error {
return ErrRetryFailed
}

orderId, err := strconv.Atoi(nexmoSMS.ClientRef)
if err != nil {
orderId = 0
}

withRetry := &retryable{
maxTries: 3,
Backoff: backoff.Backoff{
Expand All @@ -209,10 +204,10 @@ func (ns *NexmoSender) Send(msg *protocol.Message) error {
ns.kafkaProducer,
ns.kafkaReportingTopic,
&ReportEvent{
Type: "tour_arrival_estimate_nexmo",
Type: "tour_arrival_estimate_nexmo_v2",
Payload: ReportPayload{
MessageId: msg.CorrelationID(),
OrderId: orderId,
OrderId: nexmoSMS.ClientRef,
SmsText: nexmoSMS.Text,
},
})
Expand Down

0 comments on commit d9756f7

Please sign in to comment.