diff options
author | Wim <wim@42.be> | 2022-08-13 16:14:26 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-13 16:14:26 +0200 |
commit | 6a3fc713978a0c1c9290a4afd08b47886b49b635 (patch) | |
tree | aa62cd85cf5671646c75ee38b3fc140ef7edcea8 /vendor/github.com/SevereCloud/vksdk | |
parent | 3c4192ebf6a32e30cdd23a9644c2ceca72a006fa (diff) | |
download | matterbridge-msglm-6a3fc713978a0c1c9290a4afd08b47886b49b635.tar.gz matterbridge-msglm-6a3fc713978a0c1c9290a4afd08b47886b49b635.tar.bz2 matterbridge-msglm-6a3fc713978a0c1c9290a4afd08b47886b49b635.zip |
Update dependencies and go1.18 (#1873)
* Update dependencies and go1.18
* Exclude unnecessary linters and update build to go1.18
Diffstat (limited to 'vendor/github.com/SevereCloud/vksdk')
6 files changed, 95 insertions, 4 deletions
diff --git a/vendor/github.com/SevereCloud/vksdk/v2/api/api.go b/vendor/github.com/SevereCloud/vksdk/v2/api/api.go index dfc4afaf..c1fb3dea 100644 --- a/vendor/github.com/SevereCloud/vksdk/v2/api/api.go +++ b/vendor/github.com/SevereCloud/vksdk/v2/api/api.go @@ -203,10 +203,13 @@ func buildQuery(sliceParams ...Params) (context.Context, url.Values) { for _, params := range sliceParams { for key, value := range params { - if key != ":context" { - query.Set(key, FmtValue(value, 0)) - } else { + switch key { + case "access_token": + continue + case ":context": ctx = value.(context.Context) + default: + query.Set(key, FmtValue(value, 0)) } } } @@ -255,6 +258,9 @@ func (vk *VK) DefaultHandler(method string, sliceParams ...Params) (Response, er acceptEncoding = "zstd" } + token := sliceParams[len(sliceParams)-1]["access_token"].(string) + req.Header.Set("Authorization", "Bearer "+token) + req.Header.Set("User-Agent", vk.UserAgent) req.Header.Set("Content-Type", "application/x-www-form-urlencoded") diff --git a/vendor/github.com/SevereCloud/vksdk/v2/api/apps.go b/vendor/github.com/SevereCloud/vksdk/v2/api/apps.go index 892ee607..c0ecb38c 100644 --- a/vendor/github.com/SevereCloud/vksdk/v2/api/apps.go +++ b/vendor/github.com/SevereCloud/vksdk/v2/api/apps.go @@ -4,6 +4,14 @@ import ( "github.com/SevereCloud/vksdk/v2/object" ) +// AppsAddUsersToTestingGroup method. +// +// https://vk.com/dev/apps.addUsersToTestingGroup +func (vk *VK) AppsAddUsersToTestingGroup(params Params) (response int, err error) { + err = vk.RequestUnmarshal("apps.addUsersToTestingGroup", &response, params) + return +} + // AppsDeleteAppRequests deletes all request notifications from the current app. // // https://vk.com/dev/apps.deleteAppRequests @@ -140,6 +148,33 @@ func (vk *VK) AppsGetScore(params Params) (response string, err error) { return } +// AppsGetTestingGroupsResponse struct. +type AppsGetTestingGroupsResponse []object.AppsTestingGroup + +// AppsGetTestingGroups method. +// +// https://vk.com/dev/apps.getTestingGroups +func (vk *VK) AppsGetTestingGroups(params Params) (response AppsGetTestingGroupsResponse, err error) { + err = vk.RequestUnmarshal("apps.getTestingGroups", &response, params) + return +} + +// AppsRemoveTestingGroup method. +// +// https://vk.com/dev/apps.removeTestingGroup +func (vk *VK) AppsRemoveTestingGroup(params Params) (response int, err error) { + err = vk.RequestUnmarshal("apps.removeTestingGroup", &response, params) + return +} + +// AppsRemoveUsersFromTestingGroups method. +// +// https://vk.com/dev/apps.removeUsersFromTestingGroups +func (vk *VK) AppsRemoveUsersFromTestingGroups(params Params) (response int, err error) { + err = vk.RequestUnmarshal("apps.removeUsersFromTestingGroups", &response, params) + return +} + // AppsSendRequest sends a request to another user in an app that uses VK authorization. // // https://vk.com/dev/apps.sendRequest @@ -147,3 +182,16 @@ func (vk *VK) AppsSendRequest(params Params) (response int, err error) { err = vk.RequestUnmarshal("apps.sendRequest", &response, params) return } + +// AppsUpdateMetaForTestingGroupResponse struct. +type AppsUpdateMetaForTestingGroupResponse struct { + GroupID int `json:"group_id"` +} + +// AppsUpdateMetaForTestingGroup method. +// +// https://vk.com/dev/apps.updateMetaForTestingGroup +func (vk *VK) AppsUpdateMetaForTestingGroup(params Params) (response AppsUpdateMetaForTestingGroupResponse, err error) { + err = vk.RequestUnmarshal("apps.updateMetaForTestingGroup", &response, params) + return +} diff --git a/vendor/github.com/SevereCloud/vksdk/v2/api/errors.go b/vendor/github.com/SevereCloud/vksdk/v2/api/errors.go index aa6ea509..7ad0c9f7 100644 --- a/vendor/github.com/SevereCloud/vksdk/v2/api/errors.go +++ b/vendor/github.com/SevereCloud/vksdk/v2/api/errors.go @@ -622,6 +622,12 @@ const ( // Anonymous token is invalid. ErrAnonymousTokenInvalid ErrorType = 1116 + // Access token has expired. + ErrAuthAccessTokenHasExpired ErrorType = 1117 + + // Anonymous token ip mismatch. + ErrAuthAnonymousTokenIPMismatch ErrorType = 1118 + // Invalid document id. ErrParamDocID ErrorType = 1150 diff --git a/vendor/github.com/SevereCloud/vksdk/v2/api/messages.go b/vendor/github.com/SevereCloud/vksdk/v2/api/messages.go index a74266fe..7a0bebc4 100644 --- a/vendor/github.com/SevereCloud/vksdk/v2/api/messages.go +++ b/vendor/github.com/SevereCloud/vksdk/v2/api/messages.go @@ -116,6 +116,14 @@ func (vk *VK) MessagesEditChat(params Params) (response int, err error) { return } +// MessagesForceCallFinish method. +// +// https://vk.com/dev/messages.forceCallFinish +func (vk *VK) MessagesForceCallFinish(params Params) (response int, err error) { + err = vk.RequestUnmarshal("messages.forceCallFinish", &response, params) + return +} + // MessagesGetByConversationMessageIDResponse struct. type MessagesGetByConversationMessageIDResponse struct { Count int `json:"count"` @@ -633,6 +641,20 @@ func (vk *VK) MessagesSetChatPhoto(params Params) (response MessagesSetChatPhoto return } +// MessagesStartCallResponse struct. +type MessagesStartCallResponse struct { + JoinLink string `json:"join_link"` + CallID string `json:"call_id"` +} + +// MessagesStartCall method. +// +// https://vk.com/dev/messages.startCall +func (vk *VK) MessagesStartCall(params Params) (response MessagesStartCallResponse, err error) { + err = vk.RequestUnmarshal("messages.startCall", &response, params) + return +} + // MessagesUnpin messages.unpin. // // https://vk.com/dev/messages.unpin diff --git a/vendor/github.com/SevereCloud/vksdk/v2/doc.go b/vendor/github.com/SevereCloud/vksdk/v2/doc.go index aa532f9c..a61bad7d 100644 --- a/vendor/github.com/SevereCloud/vksdk/v2/doc.go +++ b/vendor/github.com/SevereCloud/vksdk/v2/doc.go @@ -7,6 +7,6 @@ package vksdk // Module constants. const ( - Version = "2.14.1" + Version = "2.15.0" API = "5.131" ) diff --git a/vendor/github.com/SevereCloud/vksdk/v2/object/apps.go b/vendor/github.com/SevereCloud/vksdk/v2/object/apps.go index c7036397..422c0190 100644 --- a/vendor/github.com/SevereCloud/vksdk/v2/object/apps.go +++ b/vendor/github.com/SevereCloud/vksdk/v2/object/apps.go @@ -100,3 +100,12 @@ type AppsScope struct { Name string `json:"name"` // Scope name Title string `json:"title"` // Scope title } + +// AppsTestingGroup testing group description. +type AppsTestingGroup struct { + GroupID int `json:"group_id"` + UserIDs []int `json:"user_ids"` + Name string `json:"name"` + Webview string `json:"webview"` + Platforms []string `json:"platforms"` +} |