[MM-61140] Allow plugins to add Support Packet data without UI elements (#28833)
Co-authored-by: Ibrahim Serdar Acikgoz <serdaracikgoz86@gmail.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
9fed818200
Коммит
053d0b5f0a
@@ -313,7 +313,7 @@ func (a *App) createUserOrGuest(c request.CTX, user *model.User, guest bool) (*m
|
||||
|
||||
pluginContext := pluginContext(c)
|
||||
a.Srv().Go(func() {
|
||||
a.ch.RunMultiHook(func(hooks plugin.Hooks) bool {
|
||||
a.ch.RunMultiHook(func(hooks plugin.Hooks, _ *model.Manifest) bool {
|
||||
hooks.UserHasBeenCreated(pluginContext, ruser)
|
||||
return true
|
||||
}, plugin.UserHasBeenCreatedID)
|
||||
@@ -1045,10 +1045,10 @@ func (a *App) UpdateActive(c request.CTX, user *model.User, active bool) (*model
|
||||
|
||||
a.sendUpdatedUserEvent(ruser)
|
||||
|
||||
if pluginsEnvironment := a.GetPluginsEnvironment(); pluginsEnvironment != nil && !active && user.DeleteAt != 0 {
|
||||
if !active && user.DeleteAt != 0 {
|
||||
a.Srv().Go(func() {
|
||||
pluginContext := pluginContext(c)
|
||||
pluginsEnvironment.RunMultiPluginHook(func(hooks plugin.Hooks) bool {
|
||||
a.ch.RunMultiHook(func(hooks plugin.Hooks, _ *model.Manifest) bool {
|
||||
hooks.UserHasBeenDeactivated(pluginContext, user)
|
||||
return true
|
||||
}, plugin.UserHasBeenDeactivatedID)
|
||||
|
||||
Ссылка в новой задаче
Block a user