diff --git a/src/components/structures/MatrixChat.js b/src/components/structures/MatrixChat.js index b8903076c7..ff30bb1605 100644 --- a/src/components/structures/MatrixChat.js +++ b/src/components/structures/MatrixChat.js @@ -1370,6 +1370,37 @@ export default React.createClass({ call: call, }, true); }); + cli.on('Call.noTURNServers', () => { + const QuestionDialog = sdk.getComponent("dialogs.QuestionDialog"); + const code = sub => {sub}; + Modal.createTrackedDialog('No TURN servers', '', QuestionDialog, { + title: _t('Homeserver not configured to support calls'), + description:
+

{ _t( + "Your homeserver %(homeserverDomain)s is " + + "currently not configured to assist with calls by offering a " + + "TURN server, which means it is likely that voice and video " + + "calls will fail. Please notify your homeserver administrator " + + "so that they can address this.", + { homeserverDomain: cli.getDomain() }, { code }, + ) }

+

{ _t( + "Riot can use a fallback server turn.matrix.org " + + "for the current session if you urgently need to make a call. " + + "Your IP address would be shared with this fallback server " + + "only if you agree and later place or receive a call.", + null, { code }, + )}

+
, + button: _t('Allow Fallback'), + cancelButton: _t('Dismiss'), + onFinished: (confirmed) => { + if (confirmed) { + cli.setFallbackICEServerAllowed(true); + } + }, + }, null, true); + }); cli.on('Session.logged_out', function(errObj) { if (Lifecycle.isLoggingOut()) return; diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index 0ca1ece48f..ecfdc5642a 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -1507,6 +1507,10 @@ "Failed to leave room": "Failed to leave room", "Can't leave Server Notices room": "Can't leave Server Notices room", "This room is used for important messages from the Homeserver, so you cannot leave it.": "This room is used for important messages from the Homeserver, so you cannot leave it.", + "Homeserver not configured to support calls": "Homeserver not configured to support calls", + "Your homeserver %(homeserverDomain)s is currently not configured to assist with calls by offering a TURN server, which means it is likely that voice and video calls will fail. Please notify your homeserver administrator so that they can address this.": "Your homeserver %(homeserverDomain)s is currently not configured to assist with calls by offering a TURN server, which means it is likely that voice and video calls will fail. Please notify your homeserver administrator so that they can address this.", + "Riot can use a fallback server turn.matrix.org for the current session if you urgently need to make a call. Your IP address would be shared with this fallback server only if you agree and later place or receive a call.": "Riot can use a fallback server turn.matrix.org for the current session if you urgently need to make a call. Your IP address would be shared with this fallback server only if you agree and later place or receive a call.", + "Allow Fallback": "Allow Fallback", "Signed Out": "Signed Out", "For security, this session has been signed out. Please sign in again.": "For security, this session has been signed out. Please sign in again.", "Terms and Conditions": "Terms and Conditions",