Skip to content

Commit

Permalink
Merge branch 'fix/channelMembersCount' into 'master'
Browse files Browse the repository at this point in the history
Fix: channel info sidebar with wrong members total

See merge request kchat/webapp!685
  • Loading branch information
antonbuks committed Apr 2, 2024
2 parents 0c5e837 + 6657a9d commit 3f1d089
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions webapp/channels/src/components/channel_info_rhs/menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,6 @@ interface MenuProps {
const Menu = ({channel, channelStats, isArchived, className, actions}: MenuProps) => {
const {formatMessage} = useIntl();

const {member_count: memberCount, guest_count: guestCount} = channelStats;
const totalMemberCount = memberCount + guestCount;

const showNotificationPreferences = channel.type !== Constants.DM_CHANNEL && !isArchived;
const showMembers = channel.type !== Constants.DM_CHANNEL;

Expand All @@ -123,7 +120,7 @@ const Menu = ({channel, channelStats, isArchived, className, actions}: MenuProps
icon={<i className='icon icon-account-outline'/>}
text={formatMessage({id: 'channel_info_rhs.menu.members', defaultMessage: 'Members'})}
opensSubpanel={true}
badge={totalMemberCount}
badge={channelStats.member_count}
onClick={() => actions.showChannelMembers(channel.id)}
/>
)}
Expand Down

0 comments on commit 3f1d089

Please sign in to comment.