Skip to content

Commit

Permalink
fix: handle no subscriber on bulk notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
mabdh committed Jun 4, 2024
1 parent 3a318e3 commit b9029d7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions core/notification/dispatch_bulk_notification_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,11 @@ func (s *DispatchBulkNotificationService) Dispatch(ctx context.Context, ns []Not
return nil, err
}

if len(metaMessages) == 0 {
s.deps.Logger.Info("no meta messages to process")
return nil, nil
}

if err := s.deps.LogService.LogNotifications(ctx, notificationLogs...); err != nil {
return nil, fmt.Errorf("failed logging notifications: %w", err)
}
Expand Down

0 comments on commit b9029d7

Please sign in to comment.