From 281ef53e7de5d30114dbf57a4b506b2d8d2720cc Mon Sep 17 00:00:00 2001 From: Wim Date: Tue, 12 Apr 2022 00:30:21 +0200 Subject: Update dependencies (#1800) --- vendor/github.com/SevereCloud/vksdk/v2/events/context.go | 5 +++++ vendor/github.com/SevereCloud/vksdk/v2/events/events.go | 2 ++ 2 files changed, 7 insertions(+) (limited to 'vendor/github.com/SevereCloud/vksdk/v2/events') diff --git a/vendor/github.com/SevereCloud/vksdk/v2/events/context.go b/vendor/github.com/SevereCloud/vksdk/v2/events/context.go index 91264cc7..3c9e69f9 100644 --- a/vendor/github.com/SevereCloud/vksdk/v2/events/context.go +++ b/vendor/github.com/SevereCloud/vksdk/v2/events/context.go @@ -15,3 +15,8 @@ func GroupIDFromContext(ctx context.Context) int { func EventIDFromContext(ctx context.Context) string { return ctx.Value(internal.EventIDKey).(string) } + +// VersionFromContext returns the version from context. +func VersionFromContext(ctx context.Context) string { + return ctx.Value(internal.EventVersionKey).(string) +} diff --git a/vendor/github.com/SevereCloud/vksdk/v2/events/events.go b/vendor/github.com/SevereCloud/vksdk/v2/events/events.go index 3f907d48..2bda613a 100644 --- a/vendor/github.com/SevereCloud/vksdk/v2/events/events.go +++ b/vendor/github.com/SevereCloud/vksdk/v2/events/events.go @@ -81,6 +81,7 @@ type GroupEvent struct { Object json.RawMessage `json:"object"` GroupID int `json:"group_id"` EventID string `json:"event_id"` + V string `json:"v"` Secret string `json:"secret"` } @@ -158,6 +159,7 @@ func NewFuncList() *FuncList { func (fl FuncList) Handler(ctx context.Context, e GroupEvent) error { // nolint:gocyclo ctx = context.WithValue(ctx, internal.GroupIDKey, e.GroupID) ctx = context.WithValue(ctx, internal.EventIDKey, e.EventID) + ctx = context.WithValue(ctx, internal.EventVersionKey, e.V) if sliceFunc, ok := fl.special[e.Type]; ok { for _, f := range sliceFunc { -- cgit v1.2.3