diff --git a/pkg/alerting/alerting.go b/pkg/alerting/alerting.go index cf83f66..3222a3e 100644 --- a/pkg/alerting/alerting.go +++ b/pkg/alerting/alerting.go @@ -169,11 +169,8 @@ func (as *alerter) eval(ctx context.Context, now time.Time, testMode bool) ([]Al for _, s := range as.scores { origScore := s.Score tgr, err := as.tgCache.TG(ctx, s.ID) - if err == nil { - if !tgr.Talkgroup.Alert { - continue - } - s.Score *= float64(tgr.Talkgroup.Weight) + if err == nil && !tgr.Talkgroup.Alert { + continue } if s.Score > as.cfg.AlertThreshold || testMode { diff --git a/pkg/talkgroups/talkgroup.go b/pkg/talkgroups/talkgroup.go index a988c24..a491661 100644 --- a/pkg/talkgroups/talkgroup.go +++ b/pkg/talkgroups/talkgroup.go @@ -13,8 +13,8 @@ type Talkgroup struct { } type ID struct { - System uint32 - Talkgroup uint32 + System uint32 `json:"sys"` + Talkgroup uint32 `json:"tg"` } type IDs []ID