Browse Source

code review changes

master
Tudor-Ovidiu Avram 4 years ago
parent
commit
86dd35b927
2 changed files with 5 additions and 1 deletions
  1. 2
    0
      react/features/invite/actions.any.js
  2. 3
    1
      react/features/invite/functions.js

+ 2
- 0
react/features/invite/actions.any.js View File

104
         } = state['features/base/config'];
104
         } = state['features/base/config'];
105
         const inviteUrl = getInviteURL(state);
105
         const inviteUrl = getInviteURL(state);
106
         const { sipInviteUrl } = state['features/base/config'];
106
         const { sipInviteUrl } = state['features/base/config'];
107
+        const { locationURL } = state['features/base/connection'];
107
         const { jwt } = state['features/base/jwt'];
108
         const { jwt } = state['features/base/jwt'];
108
         const { name: displayName } = getLocalParticipant(state);
109
         const { name: displayName } = getLocalParticipant(state);
109
 
110
 
172
 
173
 
173
         conference && inviteSipEndpoints(
174
         conference && inviteSipEndpoints(
174
             sipEndpoints,
175
             sipEndpoints,
176
+            locationURL,
175
             sipInviteUrl,
177
             sipInviteUrl,
176
             jwt,
178
             jwt,
177
             conference.options.name,
179
             conference.options.name,

+ 3
- 1
react/features/invite/functions.js View File

808
  * Sends a post request to an invite service.
808
  * Sends a post request to an invite service.
809
  *
809
  *
810
  * @param {Array} inviteItems - The list of the "sip" type items to invite.
810
  * @param {Array} inviteItems - The list of the "sip" type items to invite.
811
+ * @param {URL} locationURL - The URL of the location.
811
  * @param {string} sipInviteUrl - The invite service that generates the invitation.
812
  * @param {string} sipInviteUrl - The invite service that generates the invitation.
812
  * @param {string} jwt - The jwt token.
813
  * @param {string} jwt - The jwt token.
813
  * @param {string} roomName - The name to the conference.
814
  * @param {string} roomName - The name to the conference.
816
  */
817
  */
817
 export function inviteSipEndpoints( // eslint-disable-line max-params
818
 export function inviteSipEndpoints( // eslint-disable-line max-params
818
         inviteItems: Array<Object>,
819
         inviteItems: Array<Object>,
820
+        locationURL: URL,
819
         sipInviteUrl: string,
821
         sipInviteUrl: string,
820
         jwt: string,
822
         jwt: string,
821
         roomName: string,
823
         roomName: string,
825
         return Promise.resolve();
827
         return Promise.resolve();
826
     }
828
     }
827
 
829
 
828
-    const baseUrl = window.location.href.toLowerCase().replace(`/${roomName}`, '');
830
+    const baseUrl = locationURL.href.toLowerCase().replace(`/${roomName}`, '');
829
 
831
 
830
     return fetch(
832
     return fetch(
831
        sipInviteUrl,
833
        sipInviteUrl,

Loading…
Cancel
Save