diff --git a/webapp/actions/post_actions.jsx b/webapp/actions/post_actions.jsx index c0abbd1c34..015d93d0fe 100644 --- a/webapp/actions/post_actions.jsx +++ b/webapp/actions/post_actions.jsx @@ -36,6 +36,11 @@ export function handleNewPost(post, msg) { if (ChannelStore.getMyMember(post.channel_id)) { completePostReceive(post, websocketMessageProps); } else { + // This API call requires any real team id in API v3, so set one if we don't already have one + if (!Client.teamId && msg && msg.data) { + Client.setTeamId(msg.data.team_id); + } + AsyncClient.getChannelMember(post.channel_id, UserStore.getCurrentId()).then(() => completePostReceive(post, websocketMessageProps)); } }