MM-56776 Call ChannelHasBeenCreated plugin hook for GMs (#26226)

This commit is contained in:
Harrison Healey 2024-02-16 09:47:08 -05:00 committed by GitHub
parent 5fcab87934
commit 7d9f725d90
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 2 deletions

View File

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

View File

@ -1887,8 +1887,6 @@ func TestChannelHasBeenCreated(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()
defer th.TearDown()