From e7ddeedb3e1d6dad13d29278443850da8cac381b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?David=20N=C3=A9grier?= <d.negrier@thecodingmachine.com>
Date: Wed, 10 Feb 2021 11:13:47 +0100
Subject: [PATCH] Disabling Join/Leave notifications by default

---
 front/src/WebRtc/JitsiFactory.ts | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/front/src/WebRtc/JitsiFactory.ts b/front/src/WebRtc/JitsiFactory.ts
index 4d4d9f64..d9b0e9ea 100644
--- a/front/src/WebRtc/JitsiFactory.ts
+++ b/front/src/WebRtc/JitsiFactory.ts
@@ -3,7 +3,7 @@ import {mediaManager} from "./MediaManager";
 import {coWebsiteManager} from "./CoWebsiteManager";
 declare const window:any; // eslint-disable-line @typescript-eslint/no-explicit-any
 
-const defaultConfig = {               
+const defaultConfig = {
     startWithAudioMuted: !mediaManager.constraintsMedia.audio,
     startWithVideoMuted: mediaManager.constraintsMedia.video === false,
     prejoinPageEnabled: false
@@ -14,6 +14,7 @@ const defaultInterfaceConfig = {
     MOBILE_APP_PROMO: false,
 
     HIDE_INVITE_MORE_HEADER: true,
+    DISABLE_JOIN_LEAVE_NOTIFICATIONS: true,
 
     // Note: hiding brand does not seem to work, we probably need to put this on the server side.
     SHOW_BRAND_WATERMARK: false,
@@ -35,7 +36,7 @@ class JitsiFactory {
     private jitsiApi: any; // eslint-disable-line @typescript-eslint/no-explicit-any
     private audioCallback = this.onAudioChange.bind(this);
     private videoCallback = this.onVideoChange.bind(this);
-    
+
     public start(roomName: string, playerName:string, jwt?: string, config?: object, interfaceConfig?: object): void {
         coWebsiteManager.insertCoWebsite((cowebsiteDiv => {
             const domain = JITSI_URL;
@@ -51,7 +52,7 @@ class JitsiFactory {
             if (!options.jwt) {
                 delete options.jwt;
             }
-            
+
             return new Promise((resolve, reject) => {
                 options.onload = () => resolve(); //we want for the iframe to be loaded before triggering animations.
                 setTimeout(() => resolve(), 2000); //failsafe in case the iframe is deleted before loading or too long to load
@@ -91,4 +92,4 @@ class JitsiFactory {
     }
 }
 
-export const jitsiFactory = new JitsiFactory();
\ No newline at end of file
+export const jitsiFactory = new JitsiFactory();