switch to roomState.mayClientSendStateEvent
This commit is contained in:
parent
4db79edb73
commit
1aa84f2d15
1 changed files with 8 additions and 8 deletions
|
@ -422,13 +422,13 @@ module.exports = React.createClass({
|
||||||
Mute notifications for this room
|
Mute notifications for this room
|
||||||
</label>
|
</label>
|
||||||
<label>
|
<label>
|
||||||
<input type="checkbox" disabled={ !roomState.maySendStateEvent("m.room.join_rule", user_id) }
|
<input type="checkbox" disabled={ !roomState.mayClientSendStateEvent("m.room.join_rule", cli) }
|
||||||
onChange={this._onToggle.bind(this, "join_rule", "invite", "public")}
|
onChange={this._onToggle.bind(this, "join_rule", "invite", "public")}
|
||||||
defaultChecked={this.state.join_rule !== "public"}/>
|
defaultChecked={this.state.join_rule !== "public"}/>
|
||||||
Make this room private
|
Make this room private
|
||||||
</label>
|
</label>
|
||||||
<label>
|
<label>
|
||||||
<input type="checkbox" disabled={ !roomState.maySendStateEvent("m.room.guest_access", user_id) }
|
<input type="checkbox" disabled={ !roomState.mayClientSendStateEvent("m.room.guest_access", cli) }
|
||||||
onChange={this._onToggle.bind(this, "guest_access", "can_join", "forbidden")}
|
onChange={this._onToggle.bind(this, "guest_access", "can_join", "forbidden")}
|
||||||
defaultChecked={this.state.guest_access === "can_join"}/>
|
defaultChecked={this.state.guest_access === "can_join"}/>
|
||||||
Let guests join this room
|
Let guests join this room
|
||||||
|
@ -437,28 +437,28 @@ module.exports = React.createClass({
|
||||||
<h3>Who can read history?</h3>
|
<h3>Who can read history?</h3>
|
||||||
<label htmlFor="hvis_wr">
|
<label htmlFor="hvis_wr">
|
||||||
<input type="radio" id="hvis_wr" name="historyVis" value="world_readable"
|
<input type="radio" id="hvis_wr" name="historyVis" value="world_readable"
|
||||||
disabled={ !roomState.maySendStateEvent("m.room.history_visibility", user_id) }
|
disabled={ !roomState.mayClientSendStateEvent("m.room.history_visibility", cli) }
|
||||||
defaultChecked={historyVisibility === "world_readable"}
|
defaultChecked={historyVisibility === "world_readable"}
|
||||||
onChange={this._onHistoryRadioToggle} />
|
onChange={this._onHistoryRadioToggle} />
|
||||||
Anyone
|
Anyone
|
||||||
</label>
|
</label>
|
||||||
<label htmlFor="hvis_sh">
|
<label htmlFor="hvis_sh">
|
||||||
<input type="radio" id="hvis_sh" name="historyVis" value="shared"
|
<input type="radio" id="hvis_sh" name="historyVis" value="shared"
|
||||||
disabled={ !roomState.maySendStateEvent("m.room.history_visibility", user_id) }
|
disabled={ !roomState.mayClientSendStateEvent("m.room.history_visibility", cli) }
|
||||||
defaultChecked={historyVisibility === "shared"}
|
defaultChecked={historyVisibility === "shared"}
|
||||||
onChange={this._onHistoryRadioToggle} />
|
onChange={this._onHistoryRadioToggle} />
|
||||||
Members only (since the room began)
|
Members only (since the room began)
|
||||||
</label>
|
</label>
|
||||||
<label htmlFor="hvis_inv">
|
<label htmlFor="hvis_inv">
|
||||||
<input type="radio" id="hvis_inv" name="historyVis" value="invited"
|
<input type="radio" id="hvis_inv" name="historyVis" value="invited"
|
||||||
disabled={ !roomState.maySendStateEvent("m.room.history_visibility", user_id) }
|
disabled={ !roomState.mayClientSendStateEvent("m.room.history_visibility", cli) }
|
||||||
defaultChecked={historyVisibility === "invited"}
|
defaultChecked={historyVisibility === "invited"}
|
||||||
onChange={this._onHistoryRadioToggle} />
|
onChange={this._onHistoryRadioToggle} />
|
||||||
Members only (since they were invited)
|
Members only (since they were invited)
|
||||||
</label>
|
</label>
|
||||||
<label htmlFor="hvis_joi">
|
<label htmlFor="hvis_joi">
|
||||||
<input type="radio" id="hvis_joi" name="historyVis" value="joined"
|
<input type="radio" id="hvis_joi" name="historyVis" value="joined"
|
||||||
disabled={ !roomState.maySendStateEvent("m.room.history_visibility", user_id) }
|
disabled={ !roomState.mayClientSendStateEvent("m.room.history_visibility", cli) }
|
||||||
defaultChecked={historyVisibility === "joined"}
|
defaultChecked={historyVisibility === "joined"}
|
||||||
onChange={this._onHistoryRadioToggle} />
|
onChange={this._onHistoryRadioToggle} />
|
||||||
Members only (since they joined)
|
Members only (since they joined)
|
||||||
|
@ -478,8 +478,8 @@ module.exports = React.createClass({
|
||||||
|
|
||||||
<AliasSettings ref="alias_settings"
|
<AliasSettings ref="alias_settings"
|
||||||
roomId={this.props.room.roomId}
|
roomId={this.props.room.roomId}
|
||||||
canSetCanonicalAlias={ roomState.maySendStateEvent("m.room.canonical_alias", user_id) }
|
canSetCanonicalAlias={ roomState.mayClientSendStateEvent("m.room.canonical_alias", cli) }
|
||||||
canSetAliases={ roomState.maySendStateEvent("m.room.aliases", user_id) }
|
canSetAliases={ roomState.mayClientSendStateEvent("m.room.aliases", cli) }
|
||||||
canonicalAliasEvent={this.props.room.currentState.getStateEvents('m.room.canonical_alias', '')}
|
canonicalAliasEvent={this.props.room.currentState.getStateEvents('m.room.canonical_alias', '')}
|
||||||
aliasEvents={this.props.room.currentState.getStateEvents('m.room.aliases')} />
|
aliasEvents={this.props.room.currentState.getStateEvents('m.room.aliases')} />
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue