Check the correct event type for the room

Signed-off-by: Travis Ralston <travpc@gmail.com>
pull/21833/head
Travis Ralston 2017-11-04 15:48:24 -06:00
parent a8169a682c
commit bb5f7bed85
1 changed files with 4 additions and 1 deletions

View File

@ -48,8 +48,11 @@ export default class RoomSettingsHandler extends SettingsHandler {
const cli = MatrixClientPeg.get();
const room = cli.getRoom(roomId);
let eventType = "im.vector.web.settings";
if (settingName === "urlPreviewsEnabled") eventType = "org.matrix.room.preview_urls";
if (!room) return false;
return room.currentState.maySendStateEvent("im.vector.web.settings", cli.getUserId());
return room.currentState.maySendStateEvent(eventType, cli.getUserId());
}
isSupported() {