fix: include inactive channels in negative activity filters
This commit is contained in:
@@ -64,6 +64,13 @@ func (f AnalyticsFilter) MatchesMetrics(row *AnalyticsRow) (bool, error) {
|
||||
return true, nil
|
||||
}
|
||||
|
||||
// Inactive channels match a negative activity filter, unless another selected
|
||||
// metric explicitly requires activity.
|
||||
func (f AnalyticsFilter) IncludesInactiveRows() bool {
|
||||
return (f.HasRegister != nil || f.HasPay != nil) &&
|
||||
(f.HasRegister == nil || !*f.HasRegister) && (f.HasPay == nil || !*f.HasPay)
|
||||
}
|
||||
|
||||
func (r *AnalyticsRow) BusinessName() string {
|
||||
if value := strings.TrimSpace(r.BindingAccount); value != "" {
|
||||
return value
|
||||
|
||||
Reference in New Issue
Block a user