mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-06 14:20:55 +03:00
notifier plugin: add support for login succeeded events
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
@@ -44,6 +44,9 @@ func (c *NotifierConfig) hasActions() bool {
|
||||
if len(c.ProviderEvents) > 0 && len(c.ProviderObjects) > 0 {
|
||||
return true
|
||||
}
|
||||
if len(c.LogEvents) > 0 {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
@@ -250,10 +253,6 @@ func (p *notifierPlugin) notifyProviderAction(event *notifier.ProviderEvent, obj
|
||||
}
|
||||
|
||||
func (p *notifierPlugin) notifyLogEvent(event *notifier.LogEvent) {
|
||||
if !util.Contains(p.config.NotifierOptions.LogEvents, int(event.Event)) {
|
||||
return
|
||||
}
|
||||
|
||||
go func() {
|
||||
Handler.addTask()
|
||||
defer Handler.removeTask()
|
||||
|
||||
Reference in New Issue
Block a user