Commit 6efb3ef7 authored by Christopher Speller's avatar Christopher Speller Committed by GitHub

Adding error page for bad team in permalink. (#668)

parent be52df46
......@@ -124,6 +124,10 @@ export async function emitPostFocusEvent(postId) {
if (data) {
const channelId = data.posts[data.order[0]].channel_id;
const channel = ChannelStore.getChannelById(channelId);
if (!channel || channel.team_id !== TeamStore.getCurrentId()) {
browserHistory.push('/error?type=' + ErrorPageTypes.PERMALINK_NOT_FOUND);
}
if (channel && channel.type === Constants.DM_CHANNEL) {
loadNewDMIfNeeded(channel.id);
} else if (channel && channel.type === Constants.GM_CHANNEL) {
......
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