onEvent -> onStateEvent

Signed-off-by: Travis Ralston <travpc@gmail.com>
pull/21833/head
Travis Ralston 2018-05-27 10:28:47 -06:00
parent 085271a864
commit 929da30df8
1 changed files with 3 additions and 3 deletions

View File

@ -39,16 +39,16 @@ module.exports = React.createClass({
componentDidMount: function() {
this._updatePinnedMessages();
MatrixClientPeg.get().on("RoomState.events", this._onEvent);
MatrixClientPeg.get().on("RoomState.events", this._onStateEvent);
},
componentWillUnmount: function() {
if (MatrixClientPeg.get()) {
MatrixClientPeg.get().removeListener("RoomState.events", this._onEvent);
MatrixClientPeg.get().removeListener("RoomState.events", this._onStateEvent);
}
},
_onEvent: function(ev) {
_onStateEvent: function(ev) {
if (ev.getRoomId() === this.props.room.roomId && ev.getType() === "m.room.pinned_events") {
this._updatePinnedMessages();
}