Fix joining channels from the find channels screen (#7732) (#7757)

* Fix joining channels from the find channels screen

* Fix lint

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
(cherry picked from commit 8bd9cac9f5)

Co-authored-by: Daniel Espino García <larkox@gmail.com>
This commit is contained in:
Mattermost Build 2024-01-16 11:29:24 +02:00 committed by GitHub
parent 4599f41c7a
commit fd7bada58e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -219,7 +219,8 @@ const FilteredList = ({
/>
);
}
if ('teamId' in item || 'team_id' in item) {
if ('teamId' in item) {
return (
<ChannelItem
channel={item}
@ -230,7 +231,9 @@ const FilteredList = ({
testID='find_channels.filtered_list.channel_item'
/>
);
} else if ('username' in item) {
}
if ('username' in item) {
return (
<UserItem
onUserPress={onOpenDirectMessage}
@ -244,6 +247,7 @@ const FilteredList = ({
return (
<ChannelItem
channel={item}
isOnCenterBg={true}
onPress={onJoinChannel}
showTeamName={showTeamName}
shouldHighlightState={true}