From 5a1fd7daddbb07b93e3611d023ea48e1991fc0c6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 28 Jan 2022 23:48:40 +0100 Subject: Bump github.com/SevereCloud/vksdk/v2 from 2.11.0 to 2.13.0 (#1698) Bumps [github.com/SevereCloud/vksdk/v2](https://github.com/SevereCloud/vksdk) from 2.11.0 to 2.13.0. - [Release notes](https://github.com/SevereCloud/vksdk/releases) - [Commits](https://github.com/SevereCloud/vksdk/compare/v2.11.0...v2.13.0) --- updated-dependencies: - dependency-name: github.com/SevereCloud/vksdk/v2 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- vendor/github.com/SevereCloud/vksdk/v2/api/ads.go | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'vendor/github.com/SevereCloud/vksdk/v2/api/ads.go') diff --git a/vendor/github.com/SevereCloud/vksdk/v2/api/ads.go b/vendor/github.com/SevereCloud/vksdk/v2/api/ads.go index 529e1be4..544143b3 100644 --- a/vendor/github.com/SevereCloud/vksdk/v2/api/ads.go +++ b/vendor/github.com/SevereCloud/vksdk/v2/api/ads.go @@ -1,9 +1,11 @@ package api // import "github.com/SevereCloud/vksdk/v2/api" import ( + "bytes" "encoding/json" "github.com/SevereCloud/vksdk/v2/object" + "github.com/vmihailenco/msgpack/v5" ) // AdsAddOfficeUsersItem struct. @@ -21,6 +23,23 @@ func (r *AdsAddOfficeUsersItem) UnmarshalJSON(data []byte) (err error) { return } +// DecodeMsgpack func. +func (r *AdsAddOfficeUsersItem) DecodeMsgpack(dec *msgpack.Decoder) error { + data, err := dec.DecodeRaw() + if err != nil { + return err + } + + if msgpack.Unmarshal(data, &r.OK) != nil { + d := msgpack.NewDecoder(bytes.NewReader(data)) + d.SetCustomStructTag("json") + + return d.Decode(&r.Error) + } + + return nil +} + // AdsAddOfficeUsersResponse struct. type AdsAddOfficeUsersResponse []AdsAddOfficeUsersItem @@ -349,7 +368,7 @@ func (vk *VK) AdsGetAdsLayout(params Params) (response AdsGetAdsLayoutResponse, // AdsGetMusiciansResponse struct. type AdsGetMusiciansResponse struct { - Items []object.BaseObjectWithName + Items []object.AdsMusician } // AdsGetMusicians returns a list of musicians. -- cgit v1.2.3