summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/SevereCloud/vksdk/v2/events/events.go
diff options
context:
space:
mode:
authorWim <wim@42.be>2023-03-09 22:48:00 +0100
committerGitHub <noreply@github.com>2023-03-09 22:48:00 +0100
commit08779c29099e8940493df56d28d8aa131ac8342e (patch)
tree7ad8ce25cf371e582137e1706dd671a6bf4342d0 /vendor/github.com/SevereCloud/vksdk/v2/events/events.go
parentd5f9cdf912d43cd2a5cb243e086fbdab9a9073b0 (diff)
downloadmatterbridge-msglm-08779c29099e8940493df56d28d8aa131ac8342e.tar.gz
matterbridge-msglm-08779c29099e8940493df56d28d8aa131ac8342e.tar.bz2
matterbridge-msglm-08779c29099e8940493df56d28d8aa131ac8342e.zip
Update dependencies (#2007)
* Update dependencies
Diffstat (limited to 'vendor/github.com/SevereCloud/vksdk/v2/events/events.go')
-rw-r--r--vendor/github.com/SevereCloud/vksdk/v2/events/events.go114
1 files changed, 113 insertions, 1 deletions
diff --git a/vendor/github.com/SevereCloud/vksdk/v2/events/events.go b/vendor/github.com/SevereCloud/vksdk/v2/events/events.go
index 2bda613a..babc23f6 100644
--- a/vendor/github.com/SevereCloud/vksdk/v2/events/events.go
+++ b/vendor/github.com/SevereCloud/vksdk/v2/events/events.go
@@ -156,13 +156,15 @@ func NewFuncList() *FuncList {
}
// Handler group event handler.
-func (fl FuncList) Handler(ctx context.Context, e GroupEvent) error { // nolint:gocyclo
+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 {
+ f := f
+
if fl.goroutine {
go func() { f(ctx, e) }()
} else {
@@ -179,6 +181,8 @@ func (fl FuncList) Handler(ctx context.Context, e GroupEvent) error { // nolint:
}
for _, f := range fl.messageNew {
+ f := f
+
if fl.goroutine {
go func() { f(ctx, obj) }()
} else {
@@ -192,6 +196,8 @@ func (fl FuncList) Handler(ctx context.Context, e GroupEvent) error { // nolint:
}
for _, f := range fl.messageReply {
+ f := f
+
if fl.goroutine {
go func() { f(ctx, obj) }()
} else {
@@ -205,6 +211,8 @@ func (fl FuncList) Handler(ctx context.Context, e GroupEvent) error { // nolint:
}
for _, f := range fl.messageEdit {
+ f := f
+
if fl.goroutine {
go func() { f(ctx, obj) }()
} else {
@@ -218,6 +226,8 @@ func (fl FuncList) Handler(ctx context.Context, e GroupEvent) error { // nolint:
}
for _, f := range fl.messageAllow {
+ f := f
+
if fl.goroutine {
go func() { f(ctx, obj) }()
} else {
@@ -231,6 +241,8 @@ func (fl FuncList) Handler(ctx context.Context, e GroupEvent) error { // nolint:
}
for _, f := range fl.messageDeny {
+ f := f
+
if fl.goroutine {
go func() { f(ctx, obj) }()
} else {
@@ -244,6 +256,8 @@ func (fl FuncList) Handler(ctx context.Context, e GroupEvent) error { // nolint:
}
for _, f := range fl.messageTypingState {
+ f := f
+
if fl.goroutine {
go func() { f(ctx, obj) }()
} else {
@@ -257,6 +271,8 @@ func (fl FuncList) Handler(ctx context.Context, e GroupEvent) error { // nolint:
}
for _, f := range fl.messageEvent {
+ f := f
+
if fl.goroutine {
go func() { f(ctx, obj) }()
} else {
@@ -270,6 +286,8 @@ func (fl FuncList) Handler(ctx context.Context, e GroupEvent) error { // nolint:
}
for _, f := range fl.photoNew {
+ f := f
+
if fl.goroutine {
go func() { f(ctx, obj) }()
} else {
@@ -283,6 +301,8 @@ func (fl FuncList) Handler(ctx context.Context, e GroupEvent) error { // nolint:
}
for _, f := range fl.photoCommentNew {
+ f := f
+
if fl.goroutine {
go func() { f(ctx, obj) }()
} else {
@@ -296,6 +316,8 @@ func (fl FuncList) Handler(ctx context.Context, e GroupEvent) error { // nolint:
}
for _, f := range fl.photoCommentEdit {
+ f := f
+
if fl.goroutine {
go func() { f(ctx, obj) }()
} else {
@@ -309,6 +331,8 @@ func (fl FuncList) Handler(ctx context.Context, e GroupEvent) error { // nolint:
}
for _, f := range fl.photoCommentRestore {
+ f := f
+
if fl.goroutine {
go func() { f(ctx, obj) }()
} else {
@@ -322,6 +346,8 @@ func (fl FuncList) Handler(ctx context.Context, e GroupEvent) error { // nolint:
}
for _, f := range fl.photoCommentDelete {
+ f := f
+
if fl.goroutine {
go func() { f(ctx, obj) }()
} else {
@@ -335,6 +361,8 @@ func (fl FuncList) Handler(ctx context.Context, e GroupEvent) error { // nolint:
}
for _, f := range fl.audioNew {
+ f := f
+
if fl.goroutine {
go func() { f(ctx, obj) }()
} else {
@@ -348,6 +376,8 @@ func (fl FuncList) Handler(ctx context.Context, e GroupEvent) error { // nolint:
}
for _, f := range fl.videoNew {
+ f := f
+
if fl.goroutine {
go func() { f(ctx, obj) }()
} else {
@@ -361,6 +391,8 @@ func (fl FuncList) Handler(ctx context.Context, e GroupEvent) error { // nolint:
}
for _, f := range fl.videoCommentNew {
+ f := f
+
if fl.goroutine {
go func() { f(ctx, obj) }()
} else {
@@ -374,6 +406,8 @@ func (fl FuncList) Handler(ctx context.Context, e GroupEvent) error { // nolint:
}
for _, f := range fl.videoCommentEdit {
+ f := f
+
if fl.goroutine {
go func() { f(ctx, obj) }()
} else {
@@ -387,6 +421,8 @@ func (fl FuncList) Handler(ctx context.Context, e GroupEvent) error { // nolint:
}
for _, f := range fl.videoCommentRestore {
+ f := f
+
if fl.goroutine {
go func() { f(ctx, obj) }()
} else {
@@ -400,6 +436,8 @@ func (fl FuncList) Handler(ctx context.Context, e GroupEvent) error { // nolint:
}
for _, f := range fl.videoCommentDelete {
+ f := f
+
if fl.goroutine {
go func() { f(ctx, obj) }()
} else {
@@ -413,6 +451,8 @@ func (fl FuncList) Handler(ctx context.Context, e GroupEvent) error { // nolint:
}
for _, f := range fl.wallPostNew {
+ f := f
+
if fl.goroutine {
go func() { f(ctx, obj) }()
} else {
@@ -426,6 +466,8 @@ func (fl FuncList) Handler(ctx context.Context, e GroupEvent) error { // nolint:
}
for _, f := range fl.wallRepost {
+ f := f
+
if fl.goroutine {
go func() { f(ctx, obj) }()
} else {
@@ -439,6 +481,8 @@ func (fl FuncList) Handler(ctx context.Context, e GroupEvent) error { // nolint:
}
for _, f := range fl.wallReplyNew {
+ f := f
+
if fl.goroutine {
go func() { f(ctx, obj) }()
} else {
@@ -452,6 +496,8 @@ func (fl FuncList) Handler(ctx context.Context, e GroupEvent) error { // nolint:
}
for _, f := range fl.wallReplyEdit {
+ f := f
+
if fl.goroutine {
go func() { f(ctx, obj) }()
} else {
@@ -465,6 +511,8 @@ func (fl FuncList) Handler(ctx context.Context, e GroupEvent) error { // nolint:
}
for _, f := range fl.wallReplyRestore {
+ f := f
+
if fl.goroutine {
go func() { f(ctx, obj) }()
} else {
@@ -478,6 +526,8 @@ func (fl FuncList) Handler(ctx context.Context, e GroupEvent) error { // nolint:
}
for _, f := range fl.wallReplyDelete {
+ f := f
+
if fl.goroutine {
go func() { f(ctx, obj) }()
} else {
@@ -491,6 +541,8 @@ func (fl FuncList) Handler(ctx context.Context, e GroupEvent) error { // nolint:
}
for _, f := range fl.boardPostNew {
+ f := f
+
if fl.goroutine {
go func() { f(ctx, obj) }()
} else {
@@ -504,6 +556,8 @@ func (fl FuncList) Handler(ctx context.Context, e GroupEvent) error { // nolint:
}
for _, f := range fl.boardPostEdit {
+ f := f
+
if fl.goroutine {
go func() { f(ctx, obj) }()
} else {
@@ -517,6 +571,8 @@ func (fl FuncList) Handler(ctx context.Context, e GroupEvent) error { // nolint:
}
for _, f := range fl.boardPostRestore {
+ f := f
+
if fl.goroutine {
go func() { f(ctx, obj) }()
} else {
@@ -530,6 +586,8 @@ func (fl FuncList) Handler(ctx context.Context, e GroupEvent) error { // nolint:
}
for _, f := range fl.boardPostDelete {
+ f := f
+
if fl.goroutine {
go func() { f(ctx, obj) }()
} else {
@@ -543,6 +601,8 @@ func (fl FuncList) Handler(ctx context.Context, e GroupEvent) error { // nolint:
}
for _, f := range fl.marketCommentNew {
+ f := f
+
if fl.goroutine {
go func() { f(ctx, obj) }()
} else {
@@ -556,6 +616,8 @@ func (fl FuncList) Handler(ctx context.Context, e GroupEvent) error { // nolint:
}
for _, f := range fl.marketCommentEdit {
+ f := f
+
if fl.goroutine {
go func() { f(ctx, obj) }()
} else {
@@ -569,6 +631,8 @@ func (fl FuncList) Handler(ctx context.Context, e GroupEvent) error { // nolint:
}
for _, f := range fl.marketCommentRestore {
+ f := f
+
if fl.goroutine {
go func() { f(ctx, obj) }()
} else {
@@ -582,6 +646,8 @@ func (fl FuncList) Handler(ctx context.Context, e GroupEvent) error { // nolint:
}
for _, f := range fl.marketCommentDelete {
+ f := f
+
if fl.goroutine {
go func() { f(ctx, obj) }()
} else {
@@ -595,6 +661,8 @@ func (fl FuncList) Handler(ctx context.Context, e GroupEvent) error { // nolint:
}
for _, f := range fl.marketOrderNew {
+ f := f
+
if fl.goroutine {
go func() { f(ctx, obj) }()
} else {
@@ -608,6 +676,8 @@ func (fl FuncList) Handler(ctx context.Context, e GroupEvent) error { // nolint:
}
for _, f := range fl.marketOrderEdit {
+ f := f
+
if fl.goroutine {
go func() { f(ctx, obj) }()
} else {
@@ -621,6 +691,8 @@ func (fl FuncList) Handler(ctx context.Context, e GroupEvent) error { // nolint:
}
for _, f := range fl.groupLeave {
+ f := f
+
if fl.goroutine {
go func() { f(ctx, obj) }()
} else {
@@ -634,6 +706,8 @@ func (fl FuncList) Handler(ctx context.Context, e GroupEvent) error { // nolint:
}
for _, f := range fl.groupJoin {
+ f := f
+
if fl.goroutine {
go func() { f(ctx, obj) }()
} else {
@@ -647,6 +721,8 @@ func (fl FuncList) Handler(ctx context.Context, e GroupEvent) error { // nolint:
}
for _, f := range fl.userBlock {
+ f := f
+
if fl.goroutine {
go func() { f(ctx, obj) }()
} else {
@@ -660,6 +736,8 @@ func (fl FuncList) Handler(ctx context.Context, e GroupEvent) error { // nolint:
}
for _, f := range fl.userUnblock {
+ f := f
+
if fl.goroutine {
go func() { f(ctx, obj) }()
} else {
@@ -673,6 +751,8 @@ func (fl FuncList) Handler(ctx context.Context, e GroupEvent) error { // nolint:
}
for _, f := range fl.pollVoteNew {
+ f := f
+
if fl.goroutine {
go func() { f(ctx, obj) }()
} else {
@@ -686,6 +766,8 @@ func (fl FuncList) Handler(ctx context.Context, e GroupEvent) error { // nolint:
}
for _, f := range fl.groupOfficersEdit {
+ f := f
+
if fl.goroutine {
go func() { f(ctx, obj) }()
} else {
@@ -699,6 +781,8 @@ func (fl FuncList) Handler(ctx context.Context, e GroupEvent) error { // nolint:
}
for _, f := range fl.groupChangeSettings {
+ f := f
+
if fl.goroutine {
go func() { f(ctx, obj) }()
} else {
@@ -712,6 +796,8 @@ func (fl FuncList) Handler(ctx context.Context, e GroupEvent) error { // nolint:
}
for _, f := range fl.groupChangePhoto {
+ f := f
+
if fl.goroutine {
go func() { f(ctx, obj) }()
} else {
@@ -725,6 +811,8 @@ func (fl FuncList) Handler(ctx context.Context, e GroupEvent) error { // nolint:
}
for _, f := range fl.vkpayTransaction {
+ f := f
+
if fl.goroutine {
go func() { f(ctx, obj) }()
} else {
@@ -738,6 +826,8 @@ func (fl FuncList) Handler(ctx context.Context, e GroupEvent) error { // nolint:
}
for _, f := range fl.leadFormsNew {
+ f := f
+
if fl.goroutine {
go func() { f(ctx, obj) }()
} else {
@@ -751,6 +841,8 @@ func (fl FuncList) Handler(ctx context.Context, e GroupEvent) error { // nolint:
}
for _, f := range fl.appPayload {
+ f := f
+
if fl.goroutine {
go func() { f(ctx, obj) }()
} else {
@@ -764,6 +856,8 @@ func (fl FuncList) Handler(ctx context.Context, e GroupEvent) error { // nolint:
}
for _, f := range fl.messageRead {
+ f := f
+
if fl.goroutine {
go func() { f(ctx, obj) }()
} else {
@@ -777,6 +871,8 @@ func (fl FuncList) Handler(ctx context.Context, e GroupEvent) error { // nolint:
}
for _, f := range fl.likeAdd {
+ f := f
+
if fl.goroutine {
go func() { f(ctx, obj) }()
} else {
@@ -790,6 +886,8 @@ func (fl FuncList) Handler(ctx context.Context, e GroupEvent) error { // nolint:
}
for _, f := range fl.likeRemove {
+ f := f
+
if fl.goroutine {
go func() { f(ctx, obj) }()
} else {
@@ -803,6 +901,8 @@ func (fl FuncList) Handler(ctx context.Context, e GroupEvent) error { // nolint:
}
for _, f := range fl.donutSubscriptionCreate {
+ f := f
+
if fl.goroutine {
go func() { f(ctx, obj) }()
} else {
@@ -816,6 +916,8 @@ func (fl FuncList) Handler(ctx context.Context, e GroupEvent) error { // nolint:
}
for _, f := range fl.donutSubscriptionProlonged {
+ f := f
+
if fl.goroutine {
go func() { f(ctx, obj) }()
} else {
@@ -829,6 +931,8 @@ func (fl FuncList) Handler(ctx context.Context, e GroupEvent) error { // nolint:
}
for _, f := range fl.donutSubscriptionExpired {
+ f := f
+
if fl.goroutine {
go func() { f(ctx, obj) }()
} else {
@@ -842,6 +946,8 @@ func (fl FuncList) Handler(ctx context.Context, e GroupEvent) error { // nolint:
}
for _, f := range fl.donutSubscriptionCancelled {
+ f := f
+
if fl.goroutine {
go func() { f(ctx, obj) }()
} else {
@@ -855,6 +961,8 @@ func (fl FuncList) Handler(ctx context.Context, e GroupEvent) error { // nolint:
}
for _, f := range fl.donutSubscriptionPriceChanged {
+ f := f
+
if fl.goroutine {
go func() { f(ctx, obj) }()
} else {
@@ -868,6 +976,8 @@ func (fl FuncList) Handler(ctx context.Context, e GroupEvent) error { // nolint:
}
for _, f := range fl.donutMoneyWithdraw {
+ f := f
+
if fl.goroutine {
go func() { f(ctx, obj) }()
} else {
@@ -881,6 +991,8 @@ func (fl FuncList) Handler(ctx context.Context, e GroupEvent) error { // nolint:
}
for _, f := range fl.donutMoneyWithdrawError {
+ f := f
+
if fl.goroutine {
go func() { f(ctx, obj) }()
} else {