You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-13 23:41:50 +03:00
Make the function call-rate limiting a generic thing and use it in more places.
This commit is contained in:
@ -41,6 +41,7 @@ var Resend = require("../../Resend");
|
||||
var SlashCommands = require("../../SlashCommands");
|
||||
var dis = require("../../dispatcher");
|
||||
var Tinter = require("../../Tinter");
|
||||
var rate_limited_func = require('../../ratelimitedfunc');
|
||||
|
||||
var PAGINATE_SIZE = 20;
|
||||
var INITIAL_SIZE = 20;
|
||||
@ -617,7 +618,7 @@ module.exports = React.createClass({
|
||||
}
|
||||
},
|
||||
|
||||
_updateTabCompleteList: function(room) {
|
||||
_updateTabCompleteList: new rate_limited_func(function(room) {
|
||||
if (!room || !this.tabComplete) {
|
||||
return;
|
||||
}
|
||||
@ -626,7 +627,7 @@ module.exports = React.createClass({
|
||||
CommandEntry.fromCommands(SlashCommands.getCommandList())
|
||||
)
|
||||
);
|
||||
},
|
||||
}, 500),
|
||||
|
||||
_initialiseMessagePanel: function() {
|
||||
var messagePanel = ReactDOM.findDOMNode(this.refs.messagePanel);
|
||||
|
Reference in New Issue
Block a user