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

* Fix joining channels from the find channels screen

* Fix lint

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
This commit is contained in:
Daniel Espino García 2024-01-15 10:18:37 +01:00 committed by GitHub
parent cc96982d24
commit 8bd9cac9f5
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}