diff options
Diffstat (limited to 'webapp/utils')
-rw-r--r-- | webapp/utils/channel_utils.jsx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/webapp/utils/channel_utils.jsx b/webapp/utils/channel_utils.jsx index 119021fce..113d86ea8 100644 --- a/webapp/utils/channel_utils.jsx +++ b/webapp/utils/channel_utils.jsx @@ -35,7 +35,7 @@ export function buildDisplayableChannelList(persistentChannels) { publicChannels: notFavoriteChannels.filter(isOpenChannel), privateChannels: notFavoriteChannels.filter(isPrivateChannel), directChannels: directChannels.filter(isConnectedToTeamMember), - directNonTeamChannels: directChannels.filter(not(isConnectedToTeamMember)) + directNonTeamChannels: directChannels.filter(isNotConnectedToTeamMember) }; } @@ -119,6 +119,10 @@ function isTeamMember(userId) { return TeamStore.hasActiveMemberInTeam(TeamStore.getCurrentId(), userId); } +function isNotConnectedToTeamMember(channel) { + return TeamStore.hasMemberNotInTeam(TeamStore.getCurrentId(), channel.teammate_id); +} + function not(f) { return (...args) => !f(...args); } |