Commit 9d922ba3 authored by Harrison Healey's avatar Harrison Healey Committed by Joram Wilander

MM-10996 Fixed getting post thread after receiving posts over the websocket (#552)

parent b036f8ac
......@@ -312,16 +312,14 @@ async function handleNewPostEvent(msg, dispatch, getState) {
}
if (post.root_id && !posts[post.root_id]) {
let response;
let data;
try {
response = await Client4.getPostThread(post.root_id);
data = await Client4.getPostThread(post.root_id);
} catch (e) {
console.warn('failed to get thread for new post event', e); // eslint-disable-line no-console
}
if (response && response.data) {
const data = response.data;
if (data) {
const rootUserId = data.posts[post.root_id].user_id;
const rootStatus = users.statuses[rootUserId];
if (!users.profiles[rootUserId] && rootUserId !== currentUserId) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment