Periodic crashes on community-release

Description

This happened to me on community-release on Firefox/Mac and to Elias on community-daily on Chrome/Mac at the same time. We don't know what triggers it, but it seems to only affect people who are currently viewing a DM channel since Christopher's browser didn't crash at the same time.

The crash is caused by a combination of the websocket event for deleting a channel being sent to all users, causing them to store an incomplete channel object. It's possible that this might cause other side effects, but most notably, it causes getRedirectChannelNameForTeam to error out making the app crash.

Repro steps:
1) Log into Mattermost as two different users
2) Have one user create or join a private channel
3) Delete that channel

Observed: The other user (and anyone that hasn't loaded the private channel) will have their Mattermost instance crash


Expected: Nothing happens for the other users

QA Test Steps

See description

Status

Mana

None

Assignee

Harrison Healey

Reporter

Harrison Healey

Epic Link

None

Fix versions

Mattermost Team

Sustained Engineering

Sprint

None

GitHub Issue

None

QA Assignee

Ogi Marusic

QA Testing Areas

Channel Settings