diff --git a/webapp/channels/src/components/post_view/index.ts b/webapp/channels/src/components/post_view/index.ts index c4f6bdf71c..76f7049e9c 100644 --- a/webapp/channels/src/components/post_view/index.ts +++ b/webapp/channels/src/components/post_view/index.ts @@ -25,10 +25,12 @@ export const isChannelLoading = (params: RouteViewParams, channel?: Channel, tea return false; } + const identifier = params.identifier?.toLowerCase(); + if (channel && team) { - if (channel.type !== Constants.DM_CHANNEL && channel.name !== params.identifier) { + if (channel.type !== Constants.DM_CHANNEL && channel.name !== identifier) { return true; - } else if (channel.type === Constants.DM_CHANNEL && teammate && params.identifier !== `@${teammate.username}`) { + } else if (channel.type === Constants.DM_CHANNEL && teammate && identifier !== `@${teammate.username}`) { return true; }