Ver código fonte

feat(branding) allow invite links to be branded

j8
Tudor-Ovidiu Avram 4 anos atrás
pai
commit
8a4fb72eae

+ 7
- 0
config.js Ver arquivo

@@ -626,6 +626,13 @@ var config = {
626 626
      tokenAuthUrl
627 627
      */
628 628
 
629
+    /**
630
+     * This property can be used to alter the generated meeting invite links (in combination with a branding domain
631
+     * which is retrieved internally by jitsi meet) (e.g. https://meet.jit.si/someMeeting
632
+     * can become https://brandedDomain/roomAlias)
633
+     */
634
+    // brandingRoomAlias: null,
635
+
629 636
     // List of undocumented settings used in lib-jitsi-meet
630 637
     /**
631 638
      _peerConnStatusOutOfLastNTimeout

+ 1
- 0
react/features/base/config/configWhitelist.js Ver arquivo

@@ -69,6 +69,7 @@ export default [
69 69
 
70 70
     'channelLastN',
71 71
     'constraints',
72
+    'brandingRoomAlias',
72 73
     'debug',
73 74
     'debugAudioLevels',
74 75
     'defaultLanguage',

+ 11
- 1
react/features/base/connection/functions.js Ver arquivo

@@ -54,7 +54,17 @@ export function getInviteURL(stateOrGetState: Function | Object): string {
54 54
         throw new Error('Can not get invite URL - the app is not ready');
55 55
     }
56 56
 
57
-    return getURLWithoutParams(locationURL).href;
57
+    const { inviteDomain } = state['features/dynamic-branding'];
58
+    const urlWithoutParams = getURLWithoutParams(locationURL);
59
+
60
+    if (inviteDomain) {
61
+        const meetingId
62
+            = state['features/base/config'].brandingRoomAlias || urlWithoutParams.pathname;
63
+
64
+        return `${inviteDomain}/${meetingId}`;
65
+    }
66
+
67
+    return urlWithoutParams.href;
58 68
 }
59 69
 
60 70
 /**

+ 0
- 1
react/features/dynamic-branding/actions.js Ver arquivo

@@ -53,7 +53,6 @@ function setDynamicBrandingData(value) {
53 53
     };
54 54
 }
55 55
 
56
-
57 56
 /**
58 57
  * Action used to signal the branding elements are ready to be displayed.
59 58
  *

+ 3
- 1
react/features/dynamic-branding/reducer.js Ver arquivo

@@ -14,6 +14,7 @@ const DEFAULT_STATE = {
14 14
     backgroundColor: '',
15 15
     backgroundImageUrl: '',
16 16
     customizationReady: false,
17
+    inviteDomain: '',
17 18
     logoClickUrl: '',
18 19
     logoImageUrl: ''
19 20
 };
@@ -24,11 +25,12 @@ const DEFAULT_STATE = {
24 25
 ReducerRegistry.register(STORE_NAME, (state = DEFAULT_STATE, action) => {
25 26
     switch (action.type) {
26 27
     case SET_DYNAMIC_BRANDING_DATA: {
27
-        const { backgroundColor, backgroundImageUrl, logoClickUrl, logoImageUrl } = action.value;
28
+        const { backgroundColor, backgroundImageUrl, inviteDomain, logoClickUrl, logoImageUrl } = action.value;
28 29
 
29 30
         return {
30 31
             backgroundColor,
31 32
             backgroundImageUrl,
33
+            inviteDomain,
32 34
             logoClickUrl,
33 35
             logoImageUrl,
34 36
             customizationReady: true

Carregando…
Cancelar
Salvar