Skip to content

Commit 5e3521c

Browse files
committed
mclient: export init function
1 parent 1487ca4 commit 5e3521c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pkg/connector/mclient.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ import (
3333

3434
type newMCFunc = func(json.RawMessage, mWAClient) mClient
3535

36-
var newMC newMCFunc
36+
var NewMC newMCFunc
3737

3838
func init() {
3939
path := os.Getenv("WM_PLUGIN_PATH")
@@ -42,12 +42,12 @@ func init() {
4242
}
4343
plug := exerrors.Must(plugin.Open(path))
4444
sym := exerrors.Must(plug.Lookup("NewClient"))
45-
newMC = sym.(newMCFunc)
45+
NewMC = sym.(newMCFunc)
4646
}
4747

4848
func (wa *WhatsAppClient) initMC() {
49-
if newMC != nil {
50-
wa.MC = newMC(wa.UserLogin.Metadata.(*waid.UserLoginMetadata).MData, wa)
49+
if NewMC != nil {
50+
wa.MC = NewMC(wa.UserLogin.Metadata.(*waid.UserLoginMetadata).MData, wa)
5151
}
5252
}
5353

0 commit comments

Comments
 (0)