mirror of
https://github.com/element-hq/element-web
synced 2024-11-22 01:05:42 +03:00
stop guests rom trying to blunder into non-guest rooms
This commit is contained in:
parent
5794c30def
commit
50f94eb040
1 changed files with 11 additions and 0 deletions
|
@ -79,6 +79,17 @@ module.exports = React.createClass({
|
||||||
}
|
}
|
||||||
var oob_data = {};
|
var oob_data = {};
|
||||||
if (room) {
|
if (room) {
|
||||||
|
if (MatrixClientPeg.get().isGuest()) {
|
||||||
|
if (!room.world_readable && !room.guest_can_join) {
|
||||||
|
var NeedToRegisterDialog = sdk.getComponent("dialogs.NeedToRegisterDialog");
|
||||||
|
Modal.createDialog(NeedToRegisterDialog, {
|
||||||
|
title: "Failed to join the room",
|
||||||
|
description: "This room is inaccessible to guests. You may be able to join if you register."
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
oob_data = {
|
oob_data = {
|
||||||
avatarUrl: room.avatar_url,
|
avatarUrl: room.avatar_url,
|
||||||
// XXX: This logic is duplicated from the JS SDK which
|
// XXX: This logic is duplicated from the JS SDK which
|
||||||
|
|
Loading…
Reference in a new issue