feat(BRIDGE-268): add kill switch feature flag for the IMAP AUTHENTICATE command.

This commit is contained in:
Xavier Michelon
2024-11-22 11:19:44 +01:00
parent b3e2a91f56
commit cdcdd45bcf
7 changed files with 25 additions and 25 deletions

View File

@ -50,7 +50,6 @@ type Service struct {
}
const bitfieldRegexPattern = `^\\\d+`
const disableNotificationsKillSwitch = "InboxBridgeEventLoopNotificationDisabled"
func NewService(userID string, service userevents.Subscribable, eventPublisher events.EventPublisher, store *Store,
getFlagFn unleash.GetFlagValueFn, observabilitySender observability.Sender) *Service {
@ -103,7 +102,7 @@ func (s *Service) run(ctx context.Context) {
}
func (s *Service) HandleNotificationEvents(ctx context.Context, notificationEvents []proton.NotificationEvent) error {
if s.getFlagValueFn(disableNotificationsKillSwitch) {
if s.getFlagValueFn(unleash.EventLoopNotificationDisabled) {
s.log.Info("Received notification events. Skipping as kill switch is enabled.")
return nil
}