onEvent -> onStateEvent

Signed-off-by: Travis Ralston <travpc@gmail.com>
This commit is contained in:
Travis Ralston 2018-05-27 10:28:47 -06:00
parent 085271a864
commit 929da30df8

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();
}