diff options
Diffstat (limited to 'webapp/actions')
-rw-r--r-- | webapp/actions/channel_actions.jsx | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/webapp/actions/channel_actions.jsx b/webapp/actions/channel_actions.jsx index 8364fe9b6..61c839652 100644 --- a/webapp/actions/channel_actions.jsx +++ b/webapp/actions/channel_actions.jsx @@ -118,7 +118,7 @@ export function removeUserFromChannel(channelId, userId, success, error) { export function openDirectChannelToUser(user, success, error) { const channelName = Utils.getDirectChannelName(UserStore.getCurrentId(), user.id); - let channel = ChannelStore.getByName(channelName); + const channel = ChannelStore.getByName(channelName); if (channel) { PreferenceStore.setPreference(Preferences.CATEGORY_DIRECT_CHANNEL_SHOW, user.id, 'true'); @@ -137,16 +137,6 @@ export function openDirectChannelToUser(user, success, error) { return; } - channel = { - name: channelName, - last_post_at: 0, - total_msg_count: 0, - type: 'D', - display_name: user.username, - teammate_id: user.id, - status: UserStore.getStatus(user.id) - }; - Client.createDirectChannel( user.id, (data) => { |