feat(mqtt): peer-namespaced talker topics
External (peer-side) talker events move from flat talker/<tg>/start with is_trunk=true to peer/<peer_id>/talker/<tg>/start. Local-only talker/<tg>/start retains today's behavior. To carry peer_id through the signal path: add peer_id as a 4th argument to TGHandler::trunkTalkerUpdated; reorder clearTrunkTalkerForTG / clearTrunkTalkersForPeer / clearAllTrunkTalkers so the signal fires before m_trunk_talker_peer_ids is erased; pre-populate m_trunk_talker_peer_ids in setTrunkTalkerForTGViaPeer before calling the inner setter; switch TrunkLink::handleMsgPeerTalkerStart from setTrunkTalkerForTG to setTrunkTalkerForTGViaPeer. Reasons: dashboards subscribing across the mesh can now use peer/+/talker/+/start to enumerate peer talkers without parsing the is_trunk payload flag, and the namespacing aligns with the new peer/<peer_id>/client/<call>/* topics added in Tasks 5-6.
This commit is contained in:
1 parent
81672bae23
commit
af746d7534
8 files changed
+105
-34
No files matched your search
@@ -1023,7 +1023,8 @@ void TrunkLink::handleMsgPeerTalkerStart(std::istream& is)
|
||||
|
||||
m_peer_active_tgs.insert(local_tg);
|
||||
m_peer_interested_tgs[local_tg] = std::time(nullptr);
|
||||
TGHandler::instance()->setTrunkTalkerForTG(local_tg, msg.callsign());
|
||||
TGHandler::instance()->setTrunkTalkerForTGViaPeer(local_tg, msg.callsign(),
|
||||
peerId());
|
||||
m_reflector->notifyExternalTrunkTalkerStart(local_tg, m_section, msg.callsign());
|
||||
|
||||
// Owner-relay: if we own this TG, propagate the talker-start to every
|
||||
|
||||
Reference in new issue
Block a user