mirror of
https://gitlab.com/comunic/comunicapiv2
synced 2025-09-20 14:18:47 +00:00
Forward signals for web app to rtc proxy
This commit is contained in:
@@ -80,4 +80,20 @@ export class UserWebSocketRequestsHandler extends BaseRequestsHandler {
|
||||
|
||||
return convID;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the ID of a peer of a call included in the WebSocket request
|
||||
*
|
||||
* @param callID Target call ID
|
||||
* @param name The name of the POST field
|
||||
*/
|
||||
public postCallPeerID(callID: number, name: string) : number{
|
||||
const peerID = this.postInt(name);
|
||||
|
||||
if(peerID != this.getUserId() && UserWebSocketController.active_clients.find(
|
||||
(e) => e.userID == peerID && e.activeCalls.has(callID)) === undefined)
|
||||
this.error(401, "This peer is not a member of the call!");
|
||||
|
||||
return peerID;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user