Handles a participant's request by adding it to the request list and updating the total count of requests and waiting room participants.
const options = { userRequest: { id: "user123", reason: "join" }, requestList: [{ id: "user1", reason: "help" }], waitingRoomList: [{ id: "user2", name: "Alice" }], updateTotalReqWait: (count) => console.log("Total requests:", count), updateRequestList: (list) => console.log("Updated request list:", list),};await participantRequested(options);// Output:// "Updated request list: [{ id: 'user1', reason: 'help' }, { id: 'user123', reason: 'join' }]"// "Total requests: 3" Copy
const options = { userRequest: { id: "user123", reason: "join" }, requestList: [{ id: "user1", reason: "help" }], waitingRoomList: [{ id: "user2", name: "Alice" }], updateTotalReqWait: (count) => console.log("Total requests:", count), updateRequestList: (list) => console.log("Updated request list:", list),};await participantRequested(options);// Output:// "Updated request list: [{ id: 'user1', reason: 'help' }, { id: 'user123', reason: 'join' }]"// "Total requests: 3"
The options for handling the participant's request.
A promise that resolves when the participant's request has been handled.
Handles a participant's request by adding it to the request list and updating the total count of requests and waiting room participants.
Example