Merge branch 'release-3.5'
Этот коммит содержится в:
@@ -135,6 +135,7 @@ function populateDMChannelsWithProfiles(userIds) {
|
||||
const currentUserId = UserStore.getCurrentId();
|
||||
|
||||
for (let i = 0; i < userIds.length; i++) {
|
||||
// TODO There's a race condition here for DM channels if those channels aren't loaded yet
|
||||
const channelName = getDirectChannelName(currentUserId, userIds[i]);
|
||||
const channel = ChannelStore.getByName(channelName);
|
||||
if (channel) {
|
||||
|
||||
@@ -18,7 +18,7 @@ import * as Utils from 'utils/utils.jsx';
|
||||
import * as AsyncClient from 'utils/async_client.jsx';
|
||||
|
||||
import * as GlobalActions from 'actions/global_actions.jsx';
|
||||
import {handleNewPost, loadPosts} from 'actions/post_actions.jsx';
|
||||
import {handleNewPost, loadPosts, loadProfilesForPosts} from 'actions/post_actions.jsx';
|
||||
import {loadProfilesAndTeamMembersForDMSidebar} from 'actions/user_actions.jsx';
|
||||
import {loadChannelsForCurrentUser} from 'actions/channel_actions.jsx';
|
||||
import * as StatusActions from 'actions/status_actions.jsx';
|
||||
@@ -172,6 +172,10 @@ function handleNewPostEvent(msg) {
|
||||
const post = JSON.parse(msg.data.post);
|
||||
handleNewPost(post, msg);
|
||||
|
||||
const posts = {};
|
||||
posts[post.id] = post;
|
||||
loadProfilesForPosts(posts);
|
||||
|
||||
if (UserStore.getStatus(post.user_id) !== UserStatuses.ONLINE) {
|
||||
StatusActions.loadStatusesByIds([post.user_id]);
|
||||
}
|
||||
@@ -207,6 +211,11 @@ function handleNewUserEvent(msg) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (msg.data.user_id === UserStore.getCurrentId()) {
|
||||
// We should already have ourselves
|
||||
return;
|
||||
}
|
||||
|
||||
AsyncClient.getUser(msg.data.user_id);
|
||||
AsyncClient.getChannelStats();
|
||||
loadProfilesAndTeamMembersForDMSidebar();
|
||||
|
||||
Ссылка в новой задаче
Block a user