Skip to content

Commit

Permalink
feat: Create JQ rule for TextTrack Plugin (#597)
Browse files Browse the repository at this point in the history
* feat: Create JQ rule for TextTrack Plugin
* fix endpoint broker apply response parse json rpc response
* parse and apply jq rule on error response
* fix endpoint broker apply response parse json rpc response
---------

Co-authored-by: maggie98choy <maggie98choy@yahoo.com>
Co-authored-by: Suresh Kumar <suresh_kumar3@comcast.com>
  • Loading branch information
3 people committed Sep 16, 2024
1 parent bf93da8 commit 348c458
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 2 additions & 0 deletions core/main/src/broker/endpoint_broker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -689,6 +689,8 @@ impl BrokerOutputForwarder {
super::rules_engine::RuleTransformType::Response,
) {
apply_response(filter, &rpc_request, &mut response);
} else if response.result.is_none() && response.error.is_none() {
response.result = Some(Value::Null);
}
}

Expand Down
7 changes: 3 additions & 4 deletions core/main/src/broker/thunder/thunder_plugins_status_mgr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const DEFAULT_PLUGIN_ACTIVATION_TIMEOUT: i64 = 8;
// But it didn't work, most probably a documentation issue.
// const STATE_CHANGE_EVENT_METHOD: &str = "client.events.1.statechange";

const STATE_CHANGE_EVENT_METHOD: &str = "client.Controller.1.events.statechange";
const STATE_CHANGE_EVENT_METHOD: &str = "thunder.Broker.Controller.events.statechange";

#[derive(Debug, Deserialize, PartialEq, Serialize, Clone)]
pub struct Status {
Expand Down Expand Up @@ -271,7 +271,7 @@ impl StatusManager {
"method": format!("{}register", controller_call_sign),
"params": json!({
"event": "statechange",
"id": "client.Controller.1.events"
"id": "thunder.Broker.Controller.events"
})
})
.to_string();
Expand Down Expand Up @@ -330,8 +330,7 @@ impl StatusManager {
}
}

// return false from here so that other subscribers can also process the response
return false;
return true;
}
}

Expand Down

0 comments on commit 348c458

Please sign in to comment.