From 56fd8bf5ccde47193c10bb35ae2132c620c052eb Mon Sep 17 00:00:00 2001 From: Agniva De Sarker Date: Fri, 7 Oct 2022 16:37:06 +0530 Subject: [PATCH] MM-47403: Populate the productHooks field (#21280) We need to do this to pass the hooked events to the products. https://mattermost.atlassian.net/browse/MM-47403 ```release-note NONE ``` --- plugin/interface_generator/main.go | 1 + plugin/product_hooks_generated.go | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/plugin/interface_generator/main.go b/plugin/interface_generator/main.go index 763868f52e..0a14a092b9 100644 --- a/plugin/interface_generator/main.go +++ b/plugin/interface_generator/main.go @@ -406,6 +406,7 @@ type hooksAdapter struct { func newAdapter(productHooks any) (*hooksAdapter, error) { a := &hooksAdapter{ implemented: make(map[int]struct{}), + productHooks: productHooks, } var tt reflect.Type ft := reflect.TypeOf(productHooks) diff --git a/plugin/product_hooks_generated.go b/plugin/product_hooks_generated.go index 2431113115..584f6bed95 100644 --- a/plugin/product_hooks_generated.go +++ b/plugin/product_hooks_generated.go @@ -121,7 +121,8 @@ type hooksAdapter struct { func newAdapter(productHooks any) (*hooksAdapter, error) { a := &hooksAdapter{ - implemented: make(map[int]struct{}), + implemented: make(map[int]struct{}), + productHooks: productHooks, } var tt reflect.Type ft := reflect.TypeOf(productHooks)