Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit c35dec9

Browse files
committed
Merge remote-tracking branch 'origin/develop' into release-v0.13.0
2 parents 15c3d4e + 3c377c1 commit c35dec9

File tree

2 files changed

+19
-68
lines changed

2 files changed

+19
-68
lines changed

src/CallHandler.js

Lines changed: 19 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ import Matrix from 'matrix-js-sdk';
6161
import dis from './dispatcher';
6262
import SdkConfig from './SdkConfig';
6363
import { showUnknownDeviceDialogForCalls } from './cryptodevices';
64-
import SettingsStore from "./settings/SettingsStore";
6564
import WidgetUtils from './utils/WidgetUtils';
6665
import WidgetEchoStore from './stores/WidgetEchoStore';
6766
import ScalarAuthClient from './ScalarAuthClient';
@@ -301,67 +300,7 @@ function _onAction(payload) {
301300
break;
302301
case 'place_conference_call':
303302
console.log("Place conference call in %s", payload.room_id);
304-
305-
if (SettingsStore.isFeatureEnabled('feature_jitsi')) {
306-
_startCallApp(payload.room_id, payload.type);
307-
} else {
308-
if (MatrixClientPeg.get().isRoomEncrypted(payload.room_id)) {
309-
// Conference calls are implemented by sending the media to central
310-
// server which combines the audio from all the participants together
311-
// into a single stream. This is incompatible with end-to-end encryption
312-
// because a central server would be decrypting the audio for each
313-
// participant.
314-
// Therefore we disable conference calling in E2E rooms.
315-
const ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
316-
Modal.createTrackedDialog('Call Handler', 'Conference calls unsupported e2e', ErrorDialog, {
317-
description: _t('Conference calls are not supported in encrypted rooms'),
318-
});
319-
return;
320-
}
321-
322-
if (!ConferenceHandler) {
323-
const ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
324-
Modal.createTrackedDialog('Call Handler', 'Conference call unsupported client', ErrorDialog, {
325-
description: _t('Conference calls are not supported in this client'),
326-
});
327-
} else if (!MatrixClientPeg.get().supportsVoip()) {
328-
const ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
329-
Modal.createTrackedDialog('Call Handler', 'VoIP is unsupported', ErrorDialog, {
330-
title: _t('VoIP is unsupported'),
331-
description: _t('You cannot place VoIP calls in this browser.'),
332-
});
333-
} else {
334-
const QuestionDialog = sdk.getComponent("dialogs.QuestionDialog");
335-
Modal.createTrackedDialog('Call Handler', 'Conference calling in development', QuestionDialog, {
336-
title: _t('Warning!'),
337-
description: _t('Conference calling is in development and may not be reliable.'),
338-
onFinished: (confirm)=>{
339-
if (confirm) {
340-
ConferenceHandler.createNewMatrixCall(
341-
MatrixClientPeg.get(), payload.room_id,
342-
).done(function(call) {
343-
placeCall(call);
344-
}, function(err) {
345-
const ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
346-
console.error("Conference call failed: " + err);
347-
Modal.createTrackedDialog(
348-
'Call Handler',
349-
'Failed to set up conference call',
350-
ErrorDialog,
351-
{
352-
title: _t('Failed to set up conference call'),
353-
description: (
354-
_t('Conference call failed.') +
355-
' ' + ((err && err.message) ? err.message : '')
356-
),
357-
},
358-
);
359-
});
360-
}
361-
},
362-
});
363-
}
364-
}
303+
_startCallApp(payload.room_id, payload.type);
365304
break;
366305
case 'incoming_call':
367306
{
@@ -543,6 +482,24 @@ const callHandler = {
543482
return null;
544483
},
545484

485+
/**
486+
* The conference handler is a module that deals with implementation-specific
487+
* multi-party calling implementations. Riot passes in its own which creates
488+
* a one-to-one call with a freeswitch conference bridge. As of July 2018,
489+
* the de-facto way of conference calling is a Jitsi widget, so this is
490+
* deprecated. It reamins here for two reasons:
491+
* 1. So Riot still supports joining existing freeswitch conference calls
492+
* (but doesn't support creating them). After a transition period, we can
493+
* remove support for joining them too.
494+
* 2. To hide the one-to-one rooms that old-style conferencing creates. This
495+
* is much harder to remove: probably either we make Riot leave & forget these
496+
* rooms after we remove support for joining freeswitch conferences, or we
497+
* accept that random rooms with cryptic users will suddently appear for
498+
* anyone who's ever used conference calling, or we are stuck with this
499+
* code forever.
500+
*
501+
* @param {object} confHandler The conference handler object
502+
*/
546503
setConferenceHandler: function(confHandler) {
547504
ConferenceHandler = confHandler;
548505
},

src/settings/Settings.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,6 @@ export const SETTINGS = {
8383
supportedLevels: LEVELS_FEATURE,
8484
default: false,
8585
},
86-
"feature_jitsi": {
87-
isFeature: true,
88-
displayName: _td("Jitsi Conference Calling"),
89-
supportedLevels: LEVELS_FEATURE,
90-
default: false,
91-
},
9286
"MessageComposerInput.dontSuggestEmoji": {
9387
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
9488
displayName: _td('Disable Emoji suggestions while typing'),

0 commit comments

Comments
 (0)