summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/SevereCloud/vksdk/v2/events
diff options
context:
space:
mode:
authorWim <wim@42.be>2022-04-12 00:30:21 +0200
committerGitHub <noreply@github.com>2022-04-12 00:30:21 +0200
commit281ef53e7de5d30114dbf57a4b506b2d8d2720cc (patch)
tree5fe13b85ffe312053452e0d7107ca4b174a412e0 /vendor/github.com/SevereCloud/vksdk/v2/events
parentf044b948e257814e8e1f70d4b66821bfd9c2ff06 (diff)
downloadmatterbridge-msglm-281ef53e7de5d30114dbf57a4b506b2d8d2720cc.tar.gz
matterbridge-msglm-281ef53e7de5d30114dbf57a4b506b2d8d2720cc.tar.bz2
matterbridge-msglm-281ef53e7de5d30114dbf57a4b506b2d8d2720cc.zip
Update dependencies (#1800)
Diffstat (limited to 'vendor/github.com/SevereCloud/vksdk/v2/events')
-rw-r--r--vendor/github.com/SevereCloud/vksdk/v2/events/context.go5
-rw-r--r--vendor/github.com/SevereCloud/vksdk/v2/events/events.go2
2 files changed, 7 insertions, 0 deletions
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 {