This commit is contained in:
mr
2026-02-26 09:14:34 +01:00
parent 779e36aaef
commit 79aa3cc2b3
2 changed files with 13 additions and 1 deletions

View File

@@ -146,6 +146,18 @@ func ListenNATS(n *Node) {
} }
} }
} }
default:
// minio / admiralty config considers — route back to OriginID.
var m struct {
OriginID string `json:"origin_id"`
}
if err := json.Unmarshal(propalgation.Payload, &m); err == nil && m.OriginID != "" {
peers, _ := n.GetPeerRecord(context.Background(), m.OriginID)
for _, p := range peers {
n.StreamService.PublishCommon(nil, resp.User,
p.PeerID, stream.ProtocolConsidersResource, propalgation.Payload)
}
}
} }
case tools.PB_PLANNER: case tools.PB_PLANNER:
m := map[string]interface{}{} m := map[string]interface{}{}

View File

@@ -41,7 +41,7 @@ func (ps *StreamService) handleEvent(protocol string, evt *common.Event) error {
return err return err
} }
} }
if protocol == ProtocolConsidersResource && evt.DataType > -1 { if protocol == ProtocolConsidersResource {
if err := ps.pass(evt, tools.PB_CONSIDERS); err != nil { if err := ps.pass(evt, tools.PB_CONSIDERS); err != nil {
return err return err
} }