summaryrefslogtreecommitdiffstats
path: root/webapp/actions/channel_actions.jsx
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2016-10-20 11:32:20 -0400
committerenahum <nahumhbl@gmail.com>2016-10-20 12:32:20 -0300
commit4aa96c76b4662d6d7f9a28af0b719404c31bbb45 (patch)
treebc8f8ccc2ba7674e7377c9fe963386d0ca9b94df /webapp/actions/channel_actions.jsx
parent4688d4981a2b9f190b94c0932e8c12e15fd98ebe (diff)
downloadchat-4aa96c76b4662d6d7f9a28af0b719404c31bbb45.tar.gz
chat-4aa96c76b4662d6d7f9a28af0b719404c31bbb45.tar.bz2
chat-4aa96c76b4662d6d7f9a28af0b719404c31bbb45.zip
Fix autocomplete for old mechanisms and add partial fix for channel switcher (#4279)
Diffstat (limited to 'webapp/actions/channel_actions.jsx')
-rw-r--r--webapp/actions/channel_actions.jsx12
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) => {