From d13432beaf76150b66de2b3200d729cae368b3e9 Mon Sep 17 00:00:00 2001 From: Techno Freak Date: Sun, 19 May 2024 04:02:38 +0300 Subject: [PATCH] feat: allow muting with custom comments --- pkg/utils/utils.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/utils/utils.go b/pkg/utils/utils.go index 731b8a5..098c6ac 100644 --- a/pkg/utils/utils.go +++ b/pkg/utils/utils.go @@ -105,6 +105,11 @@ func ParseSilenceOptions(query string, c tele.Context) (*types.Silence, string) matchers := types.QueryMatcherFromKeyValueString(rest) for _, matcher := range matchers { + if matcher.Key == "comment" { + silence.Comment = matcher.Value + continue + } + matcherParsed := types.SilenceMatcher{ Name: matcher.Key, Value: matcher.Value,