4
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2025-07-03 15:27:45 +00:00

Update dependencies (#1800)

This commit is contained in:
Wim
2022-04-12 00:30:21 +02:00
committed by GitHub
parent f044b948e2
commit 281ef53e7d
93 changed files with 5743 additions and 1749 deletions

View File

@ -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)
}

View File

@ -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 {