Tweak behaviour of setting restricted join rule
This commit is contained in:
parent
e8f0412fe3
commit
912e192dc6
4 changed files with 63 additions and 41 deletions
|
@ -92,12 +92,12 @@ export default class RoomSettingsHandler extends MatrixClientBackedSettingsHandl
|
|||
if (settingName === "urlPreviewsEnabled") {
|
||||
const content = this.getSettings(roomId, "org.matrix.room.preview_urls") || {};
|
||||
content['disable'] = !newValue;
|
||||
return MatrixClientPeg.get().sendStateEvent(roomId, "org.matrix.room.preview_urls", content);
|
||||
return MatrixClientPeg.get().sendStateEvent(roomId, "org.matrix.room.preview_urls", content).then();
|
||||
}
|
||||
|
||||
const content = this.getSettings(roomId) || {};
|
||||
content[settingName] = newValue;
|
||||
return MatrixClientPeg.get().sendStateEvent(roomId, "im.vector.web.settings", content, "");
|
||||
return MatrixClientPeg.get().sendStateEvent(roomId, "im.vector.web.settings", content, "").then();
|
||||
}
|
||||
|
||||
public canSetValue(settingName: string, roomId: string): boolean {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue