Skip to content

Commit

Permalink
add Jitsi_URL_Room_Suffix config
Browse files Browse the repository at this point in the history
Jisti supports passing configuration overrides (for example
 #config.startAudioOnly=false), this suffix configuration
option makes it possible to customize the behaviour of new
jitsi rooms easily.
  • Loading branch information
fthiery committed Jun 19, 2020
1 parent 09d9905 commit 2868a09
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/livechat/server/api/v1/videoCall.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ API.v1.addRoute('livechat/video.call/:token', {
rid,
domain: rcSettings.get('Jitsi_Domain'),
provider: 'jitsi',
room: rcSettings.get('Jitsi_URL_Room_Prefix') + rcSettings.get('uniqueID') + rid,
room: rcSettings.get('Jitsi_URL_Room_Prefix') + rcSettings.get('uniqueID') + rid + rcSettings.get('Jitsi_URL_Room_Suffix'),
timeout: new Date(Date.now() + 3600 * 1000),
};

Expand Down
2 changes: 1 addition & 1 deletion app/livechat/server/methods/startVideoCall.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Meteor.methods({
return {
roomId: room._id,
domain: settings.get('Jitsi_Domain'),
jitsiRoom: settings.get('Jitsi_URL_Room_Prefix') + settings.get('uniqueID') + roomId,
jitsiRoom: settings.get('Jitsi_URL_Room_Prefix') + settings.get('uniqueID') + roomId + settings.get('Jitsi_URL_Room_Suffix'),
};
},
});
2 changes: 1 addition & 1 deletion app/videobridge/client/views/videoFlexTab.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ Template.videoFlexTab.onRendered(function() {
}

const domain = settings.get('Jitsi_Domain');
const jitsiRoom = settings.get('Jitsi_URL_Room_Prefix') + settings.get('uniqueID') + rid;
const jitsiRoom = settings.get('Jitsi_URL_Room_Prefix') + settings.get('uniqueID') + rid + settings.get('Jitsi_URL_Room_Suffix');
const noSsl = !settings.get('Jitsi_SSL');
const isEnabledTokenAuth = settings.get('Jitsi_Enabled_TokenAuth');

Expand Down
2 changes: 1 addition & 1 deletion app/videobridge/server/methods/jitsiGenerateToken.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Meteor.methods({
throw new Meteor.Error('error-not-allowed', 'not allowed', { method: 'jitsi:generateToken' });
}

const jitsiRoom = settings.get('Jitsi_URL_Room_Prefix') + settings.get('uniqueID') + rid;
const jitsiRoom = settings.get('Jitsi_URL_Room_Prefix') + settings.get('uniqueID') + rid + settings.get('Jitsi_URL_Room_Suffix');

const jitsiDomain = settings.get('Jitsi_Domain');
const jitsiApplicationId = settings.get('Jitsi_Application_ID');
Expand Down
9 changes: 9 additions & 0 deletions app/videobridge/server/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,15 @@ Meteor.startup(function() {
public: true,
});

this.add('Jitsi_URL_Room_Suffix', '', {
type: 'string',
enableQuery: {
_id: 'Jitsi_Enabled',
value: true,
},
public: true,
});

this.add('Jitsi_SSL', true, {
type: 'boolean',
enableQuery: {
Expand Down

0 comments on commit 2868a09

Please sign in to comment.