From af3db77b6f2831f5daebd28f7deaee07759de674 Mon Sep 17 00:00:00 2001 From: ItsNotGoodName Date: Thu, 26 Oct 2023 19:49:45 -0700 Subject: [PATCH] fix(mailman): check if rule is enabled --- internal/mailman/mailman.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/internal/mailman/mailman.go b/internal/mailman/mailman.go index bd8771f..f4bdf66 100644 --- a/internal/mailman/mailman.go +++ b/internal/mailman/mailman.go @@ -96,6 +96,11 @@ func (m Mailman) send(ctx context.Context, tracer trace.Tracer, env models.Envel for _, r := range rules { tracer := tracer.Sticky(trace.WithRule(r.Rule.ID)) + if !r.Rule.Enable { + tracer.Trace(ctx, "mailman.rule.skip(disabled)") + continue + } + if len(r.Endpoints) == 0 { tracer.Trace(ctx, "mailman.rule.endpoints.skip(empty)") continue