From 86fbd496af8ff646bcff8484ad1733101333e8c6 Mon Sep 17 00:00:00 2001
From: Joram Wilander <jwawilander@gmail.com>
Date: Fri, 7 Apr 2017 14:21:31 -0400
Subject: Check if we need to add DM/GM to sidebar regardless of post sender
 (#6009)

---
 webapp/actions/channel_actions.jsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'webapp/actions/channel_actions.jsx')

diff --git a/webapp/actions/channel_actions.jsx b/webapp/actions/channel_actions.jsx
index acbc943cf..ea2039047 100644
--- a/webapp/actions/channel_actions.jsx
+++ b/webapp/actions/channel_actions.jsx
@@ -300,7 +300,7 @@ export function loadDMsAndGMsForUnreads() {
         if (unreads[id].msgs > 0 || unreads[id].mentions > 0) {
             const channel = ChannelStore.get(id);
             if (channel && channel.type === Constants.DM_CHANNEL) {
-                loadNewDMIfNeeded(Utils.getUserIdFromChannelName(channel));
+                loadNewDMIfNeeded(channel.id);
             } else if (channel && channel.type === Constants.GM_CHANNEL) {
                 loadNewGMIfNeeded(channel.id);
             }
-- 
cgit v1.2.3-1-g7c22

