You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-18 09:22:18 +03:00
Fix bug where vector freezes on power level event
Make rate_limited_function accept functions with args so we can just ratelimit the event handler & be done with it. Fixes https://github.com/vector-im/vector-web/issues/1877
This commit is contained in:
@ -482,7 +482,9 @@ module.exports = React.createClass({
|
||||
}
|
||||
},
|
||||
|
||||
onRoomStateMember: function(ev, state, member) {
|
||||
// rate limited because a power level change will emit an event for every
|
||||
// member in the room.
|
||||
onRoomStateMember: new rate_limited_func(function(ev, state, member) {
|
||||
// ignore if we don't have a room yet
|
||||
if (!this.state.room) {
|
||||
return;
|
||||
@ -511,7 +513,7 @@ module.exports = React.createClass({
|
||||
member.userId === this.props.ConferenceHandler.getConferenceUserIdForRoom(member.roomId)) {
|
||||
this._updateConfCallNotification();
|
||||
}
|
||||
},
|
||||
}, 500),
|
||||
|
||||
_hasUnsentMessages: function(room) {
|
||||
return this._getUnsentMessages(room).length > 0;
|
||||
|
Reference in New Issue
Block a user