Improvments to typing messages (#5230)

Этот коммит содержится в:
Christopher Speller
2017-01-30 15:43:34 -05:00
коммит произвёл GitHub
родитель b26329cdda
Коммит 450c0b3ccb
7 изменённых файлов: 70 добавлений и 43 удалений

Просмотреть файл

@@ -454,7 +454,9 @@ export function viewLoggedIn() {
let lastTimeTypingSent = 0;
export function emitLocalUserTypingEvent(channelId, parentId) {
const t = Date.now();
if ((t - lastTimeTypingSent) > Constants.UPDATE_TYPING_MS) {
const membersInChannel = ChannelStore.getStats(channelId).member_count;
if (((t - lastTimeTypingSent) > global.window.mm_config.TimeBetweenUserTypingUpdatesMilliseconds) && membersInChannel < global.window.mm_config.MaxNotificationsPerChannel && global.window.mm_config.EnableUserTypingMessages === 'true') {
WebSocketClient.userTyping(channelId, parentId);
lastTimeTypingSent = t;
}