Skip to content

Commit f996e3f

Browse files
author
Jagjeet Dhaliwal
committed
Remove the feature flag for whatsapp sandbox
1 parent 6215e0d commit f996e3f

File tree

3 files changed

+1
-22
lines changed

3 files changed

+1
-22
lines changed

README.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -108,14 +108,6 @@ if err != nil {
108108
}
109109
```
110110

111-
Conversations WhatsApp Sandbox
112-
-------------
113-
To use the whatsapp sandbox you need to enable the `FeatureConversationsAPIWhatsAppSandbox` feature.
114-
115-
```go
116-
client.EnableFeatures(messagebird.FeatureConversationsAPIWhatsAppSandbox)
117-
```
118-
119111
Documentation
120112
-------------
121113
Complete documentation, instructions, and examples are available at:

client.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,6 @@ var (
4646
// A Feature can be enabled
4747
type Feature int
4848

49-
const (
50-
// FeatureConversationsAPIWhatsAppSandbox Enables the WhatsApp sandbox for conversations API.
51-
FeatureConversationsAPIWhatsAppSandbox Feature = iota
52-
)
53-
5449
// Client is used to access API with a given key.
5550
// Uses standard lib HTTP client internally, so should be reused instead of created as needed and it is safe for concurrent use.
5651
type Client struct {

conversation/api.go

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ const (
1616
// https://conversations.messagebird.com/v1/webhooks).
1717
apiRoot = "https://conversations.messagebird.com/v1"
1818

19-
whatsappSandboxAPIRoot = "https://whatsapp-sandbox.messagebird.com/v1"
20-
2119
// path is the path for the Conversation resource, relative to apiRoot.
2220
path = "conversations"
2321

@@ -220,13 +218,7 @@ const (
220218
// prefix the path with the Conversation API's root. This ensures the client
221219
// doesn't "handle" this for us: by default, it uses the REST API.
222220
func request(c *messagebird.Client, v interface{}, method, path string, data interface{}) error {
223-
var root string
224-
if c.IsFeatureEnabled(messagebird.FeatureConversationsAPIWhatsAppSandbox) {
225-
root = whatsappSandboxAPIRoot
226-
} else {
227-
root = apiRoot
228-
}
229-
return c.Request(v, method, fmt.Sprintf("%s/%s", root, path), data)
221+
return c.Request(v, method, fmt.Sprintf("%s/%s", apiRoot, path), data)
230222
}
231223

232224
// paginationQuery builds the query string for paginated endpoints.

0 commit comments

Comments
 (0)