summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/SevereCloud/vksdk/v2/events/context.go
blob: 91264cc742b4eda062d5db811686f6b386976889 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
package events // import "github.com/SevereCloud/vksdk/v2/events"

import (
	"context"

	"github.com/SevereCloud/vksdk/v2/internal"
)

// GroupIDFromContext returns the GroupID from context.
func GroupIDFromContext(ctx context.Context) int {
	return ctx.Value(internal.GroupIDKey).(int)
}

// EventIDFromContext returns the EventID from context.
func EventIDFromContext(ctx context.Context) string {
	return ctx.Value(internal.EventIDKey).(string)
}