From f92d08e991a6d8cf71ff4f4d7836d784b35251e4 Mon Sep 17 00:00:00 2001 From: Harrison Healey Date: Wed, 7 Feb 2024 10:57:36 -0500 Subject: [PATCH] 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 --- webapp/channels/src/utils/utils.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webapp/channels/src/utils/utils.tsx b/webapp/channels/src/utils/utils.tsx index bde32f7779..e234256be1 100644 --- a/webapp/channels/src/utils/utils.tsx +++ b/webapp/channels/src/utils/utils.tsx @@ -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]) {