MM-56759 Fix crash caused by joinPrivateChannelPrompt (#26123)

When an admin clicks on a link to a private channel they're not a member of, this crashed the app by incorrectly trying to render a Channel object instead of its name
This commit is contained in:
Harrison Healey 2024-02-07 10:57:36 -05:00 committed by GitHub
parent 2e40ede7dd
commit f92d08e991
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1397,7 +1397,7 @@ export async function handleFormattedTextClick(e: React.MouseEvent, currentRelat
}
}
if (!member) {
const {data} = await store.dispatch(joinPrivateChannelPrompt(team, channel, false));
const {data} = await store.dispatch(joinPrivateChannelPrompt(team, channel.display_name, false));
if (data.join) {
let error = false;
if (!getTeamMemberships(state)[team.id]) {