Skip to content

Commit

Permalink
[4.3] MSPB-73: dont rely on profile name, add explicit video flag (#105)
Browse files Browse the repository at this point in the history
  • Loading branch information
k-anderson authored Apr 27, 2020
1 parent 9b33da7 commit 698b1b4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
10 changes: 4 additions & 6 deletions submodules/conference/conference.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ define(function(require) {
member: {},
play_entry_tone: true,
play_exit_tone: true,
enable_video_conferencing: false
video: false
}, data_defaults || {}),
field_data: {
users: []
Expand Down Expand Up @@ -248,8 +248,6 @@ define(function(require) {
render_data = $.extend(true, defaults, { data: results.get_conference });
}

render_data.data.enable_video_conferencing = _.has(render_data, 'data.profile_name');

self.conferenceRender(render_data, target, callbacks);

if (typeof callbacks.after_render === 'function') {
Expand Down Expand Up @@ -562,20 +560,20 @@ define(function(require) {
delete data.conference_numbers_string;

// Set conferencing video settings
if (data.enable_video_conferencing) {
if (data.video) {
data = _.merge(data, {
video: true,
profile_name: 'video',
caller_controls: 'video-participant',
moderator_controls: 'video-moderator'
});
} else {
delete data.video;
delete data.profile_name;
delete data.caller_controls;
delete data.moderator_controls;
}

delete data.enable_video_conferencing;

return data;
},

Expand Down
2 changes: 1 addition & 1 deletion submodules/conference/views/edit.html
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ <h1>{{#if data.id}}{{ i18n.callflows.conference.edit_conference }}{{else}}{{ i18
<ul class="inputs-list">
<li>
<label>
<input type="checkbox" id="enable_video_conferencing" name="enable_video_conferencing"{{#if data.enable_video_conferencing}} checked="checked"{{/if}} />
<input type="checkbox" id="video" name="video"{{#if data.video}} checked="checked"{{/if}} />
<span>{{ i18n.callflows.conference.enableVideoConferencing }}</span>
</label>
</li>
Expand Down

0 comments on commit 698b1b4

Please sign in to comment.