Don't return error if already part of channel being joined (#2814)

Этот коммит содержится в:
Joram Wilander
2016-04-28 10:56:19 -04:00
коммит произвёл Christopher Speller
родитель 3dbb5ab4cc
Коммит 383cddd3d1
6 изменённых файлов: 32 добавлений и 10 удалений

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

@@ -9,8 +9,12 @@ function getCountsStateFromStores() {
var channels = ChannelStore.getAll();
var members = ChannelStore.getAllMembers();
channels.forEach(function setChannelInfo(channel) {
channels.forEach((channel) => {
var channelMember = members[channel.id];
if (channelMember == null) {
return;
}
if (channel.type === 'D') {
count += channel.total_msg_count - channelMember.msg_count;
} else if (channelMember.mention_count > 0) {
@@ -20,7 +24,7 @@ function getCountsStateFromStores() {
}
});
return {count: count};
return {count};
}
import React from 'react';