1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-07-16 22:01:54 +03:00

Jitsi: Error message on no permission

Fixes https://github.com/vector-im/riot-web/issues/7007
This commit is contained in:
David Baker
2018-07-16 15:41:03 +01:00
parent d16ac4d80c
commit 19f0617052
2 changed files with 42 additions and 32 deletions

View File

@ -461,6 +461,14 @@ function _startCallApp(roomId, type) {
WidgetUtils.setRoomWidget(roomId, widgetId, 'jitsi', widgetUrl, 'Jitsi', widgetData).then(() => {
console.log('Jitsi widget added');
}).catch((e) => {
if (e.errcode === 'M_FORBIDDEN') {
const ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
Modal.createTrackedDialog('Call Failed', '', ErrorDialog, {
title: _t('Permission Required'),
description: _t("You do not have permission to start a conference call in this room"),
});
}
console.error(e);
});
}