mirror of
https://github.com/element-hq/element-web
synced 2024-11-23 17:56:01 +03:00
this is what we call fast iteration
This commit is contained in:
parent
1b75909cad
commit
54c69b4630
1 changed files with 3 additions and 7 deletions
|
@ -110,13 +110,9 @@ module.exports = createReactClass({
|
||||||
},
|
},
|
||||||
|
|
||||||
onJoinRule: function(ev) {
|
onJoinRule: function(ev) {
|
||||||
if (!ev || !ev.event ) return;
|
if (ev.getType() !== "m.room.join_rules") return;
|
||||||
/* eslint-disable camelcase */
|
if (ev.getRoomId() !== this.props.room.roomId) return;
|
||||||
const { event: { type, room_id } } = ev;
|
const joinRule = (ev.getContent() || {}).join_rule;
|
||||||
if (type !== "m.room.join_rules") return;
|
|
||||||
if (room_id !== this.props.room.roomId) return;
|
|
||||||
/* eslint-enable camelcase */
|
|
||||||
const joinRule = event.getContent().join_rule;
|
|
||||||
this.setState({ joinRule });
|
this.setState({ joinRule });
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue