4
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2025-06-27 20:29:24 +00:00

Update vendor, move to labstack/echo/v4 Fixes #698

This commit is contained in:
Wim
2019-01-31 17:06:36 +01:00
parent f8a1ab4622
commit c81c0dd22a
265 changed files with 32014 additions and 7207 deletions

View File

@ -113,25 +113,6 @@ func (api *Client) CreateChildGroupContext(ctx context.Context, group string) (*
return &response.Group, nil
}
// CloseGroup closes a private group
func (api *Client) CloseGroup(group string) (bool, bool, error) {
return api.CloseGroupContext(context.Background(), group)
}
// CloseGroupContext closes a private group with a custom context
func (api *Client) CloseGroupContext(ctx context.Context, group string) (bool, bool, error) {
values := url.Values{
"token": {api.token},
"channel": {group},
}
response, err := imRequest(ctx, api.httpclient, "groups.close", values, api)
if err != nil {
return false, false, err
}
return response.NoOp, response.AlreadyClosed, nil
}
// GetGroupHistory fetches all the history for a private group
func (api *Client) GetGroupHistory(group string, params HistoryParameters) (*History, error) {
return api.GetGroupHistoryContext(context.Background(), group, params)
@ -256,8 +237,9 @@ func (api *Client) GetGroupInfo(group string) (*Group, error) {
// GetGroupInfoContext retrieves the given group with a custom context
func (api *Client) GetGroupInfoContext(ctx context.Context, group string) (*Group, error) {
values := url.Values{
"token": {api.token},
"channel": {group},
"token": {api.token},
"channel": {group},
"include_locale": {strconv.FormatBool(true)},
}
response, err := groupRequest(ctx, api.httpclient, "groups.info", values, api)