summaryrefslogtreecommitdiffstats
path: root/webapp/actions/status_actions.jsx
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2017-07-18 15:45:23 -0700
committerChristopher Speller <crspeller@gmail.com>2017-07-18 15:45:23 -0700
commit97f34e483b0fa8b2a8cfe75b72168cfa38cc9d80 (patch)
treeec2d68077dd2b12de3173871622f3ec2a2b61d35 /webapp/actions/status_actions.jsx
parent21a3219b9b1df033635631afa751742bd4c56ea0 (diff)
parenta350f4dc0754e1aeabb64bd712ce05f7c59cfa60 (diff)
downloadchat-97f34e483b0fa8b2a8cfe75b72168cfa38cc9d80.tar.gz
chat-97f34e483b0fa8b2a8cfe75b72168cfa38cc9d80.tar.bz2
chat-97f34e483b0fa8b2a8cfe75b72168cfa38cc9d80.zip
Merge branch 'release-4.0'
Diffstat (limited to 'webapp/actions/status_actions.jsx')
-rw-r--r--webapp/actions/status_actions.jsx16
1 files changed, 6 insertions, 10 deletions
diff --git a/webapp/actions/status_actions.jsx b/webapp/actions/status_actions.jsx
index 066a89254..e8559bd65 100644
--- a/webapp/actions/status_actions.jsx
+++ b/webapp/actions/status_actions.jsx
@@ -54,16 +54,9 @@ export function loadStatusesForChannelAndSidebar() {
const statusesToLoad = {};
const channelId = ChannelStore.getCurrentId();
- const postList = PostStore.getVisiblePosts(channelId);
- if (postList && postList.posts) {
- for (const pid in postList.posts) {
- if (!postList.posts.hasOwnProperty(pid)) {
- continue;
- }
-
- const post = postList.posts[pid];
- statusesToLoad[post.user_id] = true;
- }
+ const posts = PostStore.getVisiblePosts(channelId) || [];
+ for (const post of posts) {
+ statusesToLoad[post.user_id] = true;
}
const dmPrefs = PreferenceStore.getCategory(Preferences.CATEGORY_DIRECT_CHANNEL_SHOW);
@@ -74,6 +67,9 @@ export function loadStatusesForChannelAndSidebar() {
}
}
+ const {currentUserId} = getState().entities.users;
+ statusesToLoad[currentUserId] = true;
+
loadStatusesByIds(Object.keys(statusesToLoad));
}