summaryrefslogtreecommitdiffstats
path: root/webapp/actions/post_actions.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'webapp/actions/post_actions.jsx')
-rw-r--r--webapp/actions/post_actions.jsx5
1 files changed, 5 insertions, 0 deletions
diff --git a/webapp/actions/post_actions.jsx b/webapp/actions/post_actions.jsx
index 633a6f66a..81ef73fc5 100644
--- a/webapp/actions/post_actions.jsx
+++ b/webapp/actions/post_actions.jsx
@@ -8,6 +8,7 @@ import PostStore from 'stores/post_store.jsx';
import UserStore from 'stores/user_store.jsx';
import {loadStatusesForChannel} from 'actions/status_actions.jsx';
+import {loadNewDMIfNeeded} from 'actions/user_actions.jsx';
import Client from 'client/web_client.jsx';
import * as AsyncClient from 'utils/async_client.jsx';
@@ -22,6 +23,10 @@ export function handleNewPost(post, msg) {
websocketMessageProps = msg.data;
}
+ if (msg && msg.data && msg.data.channel_type === Constants.DM_CHANNEL) {
+ loadNewDMIfNeeded(post.user_id);
+ }
+
if (post.root_id && PostStore.getPost(post.channel_id, post.root_id) == null) {
Client.getPost(
post.channel_id,