mirror of
https://github.com/Palakis/obs-websocket.git
synced 2024-08-30 18:12:16 +00:00
requesthandler: Echo request details in response of CallVendorRequest
I generally don't like to echo data provided to obs-websocket in requests, but since we do that for the request type in base requests, this particular case seems fair. Closes #919
This commit is contained in:
parent
6122fe6ea7
commit
be1b13f15d
@ -140,6 +140,8 @@ RequestResult RequestHandler::BroadcastCustomEvent(const Request &request)
|
||||
* @requestField requestType | String | The request type to call
|
||||
* @requestField ?requestData | Object | Object containing appropriate request data | {}
|
||||
*
|
||||
* @responseField vendorName | String | Echoed of `vendorName`
|
||||
* @responseField requestType | String | Echoed of `requestType`
|
||||
* @responseField responseData | Object | Object containing appropriate response data. {} if request does not provide any response data
|
||||
*
|
||||
* @requestType CallVendorRequest
|
||||
@ -187,6 +189,8 @@ RequestResult RequestHandler::CallVendorRequest(const Request &request)
|
||||
}
|
||||
|
||||
json responseData;
|
||||
responseData["vendorName"] = vendorName;
|
||||
responseData["requestType"] = requestType;
|
||||
responseData["responseData"] = Utils::Json::ObsDataToJson(obsResponseData);
|
||||
|
||||
return RequestResult::Success(responseData);
|
||||
|
Loading…
Reference in New Issue
Block a user