From bf74bbdc7851af68cd578fbd51aeadfe8d833d40 Mon Sep 17 00:00:00 2001 From: Audric Date: Mon, 20 Apr 2026 14:54:19 +0200 Subject: [PATCH] satellite: expose active TG filter in statusJson MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When a satellite advertises a SATELLITE_FILTER via MsgTrunkFilter, the parent-side SatelliteLink now emits it as satellites[].filter in its JSON status. Key is omitted when no filter is set (empty => all TGs pass), so existing consumers that check for its absence keep working. This single field propagates to three observer surfaces for free: - HTTP /status — Reflector::refreshStatus() copies statusJson() into m_status["satellites"]. - Redis live snapshot — statusChanged -> publishSatelliteStatusToRedis reserializes statusJson() to live:satellite: on every filter change (handleMsgTrunkFilter already emits statusChanged). - MQTT retained "status" topic — the periodic publishFullStatus(m_status) timer includes the same JSON. Passive propagation only — no dedicated MQTT filter-change event. Follow-up work if active notifications are needed: emit a satellite//filter topic from handleMsgTrunkFilter. --- src/svxlink/reflector/SatelliteLink.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/svxlink/reflector/SatelliteLink.cpp b/src/svxlink/reflector/SatelliteLink.cpp index 766c249..4664137 100644 --- a/src/svxlink/reflector/SatelliteLink.cpp +++ b/src/svxlink/reflector/SatelliteLink.cpp @@ -54,6 +54,11 @@ Json::Value SatelliteLink::statusJson(void) const active_tgs.append(tg); } obj["active_tgs"] = active_tgs; + + if (!m_tg_filter.empty()) + { + obj["filter"] = m_tg_filter.toString(); + } return obj; } /* SatelliteLink::statusJson */