mirror of
https://github.com/retailcrm/mg-bot-api-client-go.git
synced 2024-11-25 06:16:03 +03:00
update ws url generation
This commit is contained in:
parent
d9bdaa949d
commit
80d712b44d
@ -669,7 +669,7 @@ func (c *MgClient) WsMeta(events []string) (string, http.Header, error) {
|
|||||||
return url, nil, err
|
return url, nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
url = fmt.Sprintf("%s%s%s%s", c.URL, prefix, "/ws?events=", strings.Join(events[:], ","))
|
url = fmt.Sprintf("%s%s%s%s", strings.Replace(c.URL, "https", "ws", 1), prefix, "/ws?events=", strings.Join(events[:], ","))
|
||||||
|
|
||||||
if url == "" {
|
if url == "" {
|
||||||
err := errors.New("empty WS URL")
|
err := errors.New("empty WS URL")
|
||||||
|
Loading…
Reference in New Issue
Block a user