Skip to content

Commit 3615c49

Browse files
committed
fix conflits
2 parents d5129a9 + 926e6f1 commit 3615c49

File tree

3 files changed

+2
-23
lines changed

3 files changed

+2
-23
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
type MessageBirdClient interface {
5550
EnableFeatures(feature Feature)
5651
DisableFeatures(feature Feature)

conversation/api.go

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ const (
1313
// https://conversations.messagebird.com/v1/webhooks).
1414
apiRoot = "https://conversations.messagebird.com/v1"
1515

16-
whatsappSandboxAPIRoot = "https://whatsapp-sandbox.messagebird.com/v1"
17-
1816
// path is the path for the Conversation resource, relative to apiRoot.
1917
path = "conversations"
2018

@@ -55,12 +53,6 @@ func (lro *PaginationRequest) QueryParams() string {
5553
// request does the exact same thing as Client.Request. It does, however,
5654
// prefix the path with the Conversation API's root. This ensures the client
5755
// doesn't "handle" this for us: by default, it uses the REST API.
58-
func request(c messagebird.MessageBirdClient, v interface{}, method, path string, data interface{}) error {
59-
var root string
60-
if c.IsFeatureEnabled(messagebird.FeatureConversationsAPIWhatsAppSandbox) {
61-
root = whatsappSandboxAPIRoot
62-
} else {
63-
root = apiRoot
64-
}
65-
return c.Request(v, method, fmt.Sprintf("%s/%s", root, path), data)
56+
func request(c *messagebird.Client, v interface{}, method, path string, data interface{}) error {
57+
return c.Request(v, method, fmt.Sprintf("%s/%s", apiRoot, path), data)
6658
}

0 commit comments

Comments
 (0)