Skip to content

Commit

Permalink
add NoStopClause parameter to ovh provider
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin Delacour committed Nov 12, 2021
1 parent 82900fe commit e143298
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions examples/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ providers:
consumer_key: consumer_key
service_name: sms-xxx-1
sender_for_response: true # True if the SMS can be reply by the receiver (if false from in receiver must valid and recorded in OVH API)
no_stop_clause: true # True if you don't need STOP clause at the end on the message
tencentcloud:
region_id: ap-shanghai
secret_id: AKIDWqaCa1aNL3V0MtSG7mCZPjvrgJhqdgeN
Expand Down
3 changes: 2 additions & 1 deletion provider/ovh/ovh.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ type Config struct {

ServiceName string `yaml:"service_name"`
SenderForResponse string `yaml:"sender_for_response"`
NoStopClause bool `default:"false" yaml:"no_stop_clause"`
}

type Ovh struct {
Expand Down Expand Up @@ -45,7 +46,7 @@ func (ovh *Ovh) Send(message sachet.Message) error {
type ovhSMS map[string]interface{}
sms := make(ovhSMS)
sms["message"] = message.Text
sms["noStopClause"] = false
sms["noStopClause"] = &ovh.config.NoStopClause
sms["sender"] = message.From
senderForResponse := &ovh.config.SenderForResponse
sms["senderForResponse"] = senderForResponse
Expand Down

0 comments on commit e143298

Please sign in to comment.