Bugfix sending of typing events

pull/1/head
David Baker 2015-07-19 17:29:41 +01:00
parent e8b944c0e1
commit caa7f813eb
1 changed files with 13 additions and 6 deletions

View File

@ -351,15 +351,22 @@ module.exports = {
},
stopUserTypingTimer: function() {
if (this.userTypingTimer) {
clearTimeout(this.userTypingTimer);
this.userTypingTimer = null;
}
},
startServerTypingTimer: function() {
if (!this.serverTypingTimer) {
var self = this;
this.serverTypingTimer = setTimeout(function() {
if (self.isTyping) {
self.sendTyping(self.isTyping);
self.startServerTypingTimer();
}
}, TYPING_SERVER_TIMEOUT / 2);
}
},
stopServerTypingTimer: function() {