2021-01-28 23:25:14 +00:00
|
|
|
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)
|
|
|
|
}
|
2022-04-11 22:30:21 +00:00
|
|
|
|
|
|
|
// VersionFromContext returns the version from context.
|
|
|
|
func VersionFromContext(ctx context.Context) string {
|
|
|
|
return ctx.Value(internal.EventVersionKey).(string)
|
|
|
|
}
|