MM-56776 Call ChannelHasBeenCreated plugin hook for GMs (#26226)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
5fcab87934
Коммит
7d9f725d90
@@ -584,6 +584,14 @@ func (a *App) createGroupChannel(c request.CTX, userIDs []string) (*model.Channe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
a.Srv().Go(func() {
|
||||||
|
pluginContext := pluginContext(c)
|
||||||
|
a.ch.RunMultiHook(func(hooks plugin.Hooks) bool {
|
||||||
|
hooks.ChannelHasBeenCreated(pluginContext, channel)
|
||||||
|
return true
|
||||||
|
}, plugin.ChannelHasBeenCreatedID)
|
||||||
|
})
|
||||||
|
|
||||||
return channel, nil
|
return channel, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1887,8 +1887,6 @@ func TestChannelHasBeenCreated(t *testing.T) {
|
|||||||
})
|
})
|
||||||
|
|
||||||
t.Run("should call hook when a GM is created", func(t *testing.T) {
|
t.Run("should call hook when a GM is created", func(t *testing.T) {
|
||||||
t.Skip("Currently broken due to MM-56776")
|
|
||||||
|
|
||||||
th := Setup(t).InitBasic()
|
th := Setup(t).InitBasic()
|
||||||
defer th.TearDown()
|
defer th.TearDown()
|
||||||
|
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user