and nop notifier

This commit is contained in:
Umputun
2018-10-26 00:37:58 -05:00
parent cc3786b9e0
commit d80b2d33cb
3 changed files with 17 additions and 5 deletions
+2 -2
View File
@@ -229,7 +229,7 @@ func (s *ServerCommand) newServerApp() (*serverApp, error) {
notifyService, err := s.makeNotify(dataService)
if err != nil {
log.Printf("[WARN] failed to make notify service, %s", err)
notifyService = nil // disable notifier
notifyService = notify.NopService // disable notifier
}
authProviders := s.makeAuthProviders(jwtService, avatarProxy, dataService)
@@ -474,7 +474,7 @@ func (s *ServerCommand) makeNotify(dataStore *service.DataStore) (*notify.Servic
}
return notify.NewService(dataStore, s.Notify.QueueSize, tg), nil
case "none":
return notify.NewService(dataStore, s.Notify.QueueSize), nil
return notify.NopService, nil
}
return nil, errors.Errorf("unsupported notification type %q", s.Notify.Type)
}