You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-11 20:22:36 +03:00
onEvent -> onStateEvent
Signed-off-by: Travis Ralston <travpc@gmail.com>
This commit is contained in:
@@ -39,16 +39,16 @@ module.exports = React.createClass({
|
|||||||
|
|
||||||
componentDidMount: function() {
|
componentDidMount: function() {
|
||||||
this._updatePinnedMessages();
|
this._updatePinnedMessages();
|
||||||
MatrixClientPeg.get().on("RoomState.events", this._onEvent);
|
MatrixClientPeg.get().on("RoomState.events", this._onStateEvent);
|
||||||
},
|
},
|
||||||
|
|
||||||
componentWillUnmount: function() {
|
componentWillUnmount: function() {
|
||||||
if (MatrixClientPeg.get()) {
|
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") {
|
if (ev.getRoomId() === this.props.room.roomId && ev.getType() === "m.room.pinned_events") {
|
||||||
this._updatePinnedMessages();
|
this._updatePinnedMessages();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user