Fix send message webrtc
authorgparant <g.parant@thecodingmachine.com>
Sun, 26 Apr 2020 15:43:21 +0000 (17:43 +0200)
committergparant <g.parant@thecodingmachine.com>
Sun, 26 Apr 2020 15:43:21 +0000 (17:43 +0200)
front/src/Connexion.ts

index b6f2db728e4813379d93f20cd76db71de2315aab..35dbd068128aad56d5b4d43cd21f8b5d21244360 100644 (file)
@@ -129,7 +129,7 @@ export interface ConnexionInterface {
     /*webrtc*/
     sendWebrtcRomm(roomId: string): void;
 
-    sendWebrtcSignal(signal: any, roomId: string): void;
+    sendWebrtcSignal(signal: any, roomId: string, userId?: string): void;
 
     receiveWebrtcSignal(callBack: Function): void;
 
@@ -230,9 +230,9 @@ export class Connexion implements ConnexionInterface {
         });
     }
 
-    sendWebrtcSignal(signal: any, roomId: string) {
+    sendWebrtcSignal(signal: any, roomId: string, userId? : string ) {
         this.socket.emit(EventMessage.WEBRTC_SIGNAL, JSON.stringify({
-            userId: this.userId,
+            userId: userId ? userId : this.userId,
             roomId: roomId,
             signal: signal
         }));