4
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2025-07-11 21:16:27 +00:00

Update vendor (#1498)

This commit is contained in:
Wim
2021-05-30 00:25:30 +02:00
committed by GitHub
parent 766f35554e
commit 4091b6f6b4
443 changed files with 33181 additions and 6411 deletions

View File

@ -1,6 +1,8 @@
package object // import "github.com/SevereCloud/vksdk/v2/object"
import (
"bytes"
"encoding/json"
"fmt"
)
@ -233,6 +235,28 @@ type UsersPersonal struct {
ReligionID int `json:"religion_id"`
}
// UnmarshalJSON UsersPersonal.
//
// BUG(VK): UsersPersonal return [].
func (personal *UsersPersonal) UnmarshalJSON(data []byte) error {
if bytes.Equal(data, []byte("[]")) {
return nil
}
type renamedUsersPersonal UsersPersonal
var r renamedUsersPersonal
err := json.Unmarshal(data, &r)
if err != nil {
return err
}
*personal = UsersPersonal(r)
return nil
}
// UsersRelative struct.
type UsersRelative struct {
BirthDate string `json:"birth_date"` // Date of child birthday (format dd.mm.yyyy)