mirror of
https://github.com/Palakis/obs-websocket.git
synced 2024-08-30 18:12:16 +00:00
EventHandler: Include required event intent in emit
This commit is contained in:
parent
78f9c93739
commit
f37edbd71c
@ -460,9 +460,11 @@ Authentication is not required
|
||||
```
|
||||
{
|
||||
"eventType": string,
|
||||
"eventIntent": number,
|
||||
"eventData": object(optional)
|
||||
}
|
||||
```
|
||||
- `eventIntent` is the original intent required to be subscribed to in order to receive the event.
|
||||
|
||||
**Example Message:**
|
||||
```json
|
||||
@ -470,6 +472,7 @@ Authentication is not required
|
||||
"op": 2,
|
||||
"d": {
|
||||
"eventType": "StudioModeStateChanged",
|
||||
"eventIntent": 1,
|
||||
"eventData": {
|
||||
"studioModeEnabled": true
|
||||
}
|
||||
|
@ -199,6 +199,7 @@ void WebSocketServer::BroadcastEvent(uint64_t requiredIntent, std::string eventT
|
||||
json eventMessage;
|
||||
eventMessage["op"] = 5;
|
||||
eventMessage["d"]["eventType"] = eventType;
|
||||
eventMessage["d"]["eventIntent"] = requiredIntent;
|
||||
if (eventData.is_object())
|
||||
eventMessage["d"]["eventData"] = eventData;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user