Skip to content

Conversation

@TheGreatCodeholio
Copy link

This PR modernizes and extends Broadcastify talkgroup filtering by introducing
allow/deny terminology and glob-style pattern matching, while preserving
backward compatibility with existing configs.

What changed

  • Added per-system talkgroup filters:
    • broadcastifyAllow: if non-empty, the talkgroup MUST match at least one
      pattern or the upload is skipped
    • broadcastifyDeny: if non-empty, any matching talkgroup is skipped
  • Patterns are glob-style (compiled to anchored regex):
      • matches any length
    • ? matches exactly one character
  • Filter order:
    1. allow check (if present)
    2. deny check (if present)

Docs / examples

  • Updated config docs to describe broadcastifyAllow / broadcastifyDeny as arrays
    of string/number.
  • Added examples showing both * and ? usage (e.g., "507*" and "12?45").

Notes

  • Filtering compares against the numeric talkgroup ID coerced to a string
    (e.g., 50712) so behavior is consistent whether config entries are strings
    or numbers.
  • When a call is skipped due to filters, we log an info message including the
    talkgroup ID for easier debugging.

Requesting review on naming consistency and the compatibility-key priority
ordering, but functionally this is a safe, additive upgrade.

54% less racist then before.

change config names to broadcastifyAllow broadcastifyDeny
@robotastic
Copy link
Collaborator

This looks straightforward to me and a good idea. I don't have Broadcastify uploading set up on my machine. Can someone give this code a run and see if it also works for them?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants