Skip to content

Commit

Permalink
Show (you) suffix only for current session (#560)
Browse files Browse the repository at this point in the history
  • Loading branch information
streamer45 authored Nov 10, 2023
1 parent bd08b79 commit a200fc6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion webapp/src/components/call_widget/component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -956,7 +956,7 @@ export default class CallWidget extends React.PureComponent<Props, State> {
style={{padding: '0', lineHeight: '20px', fontSize: '14px'}}
>
{getUserDisplayName(profile)}
{session.user_id === this.props.currentUserID &&
{session.session_id === this.props.currentSession?.session_id &&
<span
style={{
color: 'rgba(var(--center-channel-color-rgb), 0.56)',
Expand Down
4 changes: 2 additions & 2 deletions webapp/src/components/expanded_view/component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -804,7 +804,7 @@ export default class ExpandedView extends React.PureComponent<Props, State> {
return (
<CallParticipant
key={session.session_id}
name={`${getUserDisplayName(profile)} ${profile.id === this.props.currentUserID ? formatMessage({defaultMessage: '(you)'}) : ''}`}
name={`${getUserDisplayName(profile)} ${session.session_id === this.props.currentSession?.session_id ? formatMessage({defaultMessage: '(you)'}) : ''}`}
pictureURL={Client4.getProfilePictureUrl(profile.id, profile.last_picture_update)}
isMuted={isMuted}
isSpeaking={isSpeaking}
Expand Down Expand Up @@ -844,7 +844,7 @@ export default class ExpandedView extends React.PureComponent<Props, State> {
/>

<span style={{fontWeight: 600, fontSize: '14px', lineHeight: '20px'}}>
{getUserDisplayName(profile)} {profile.id === this.props.currentUserID && formatMessage({defaultMessage: '(you)'})}
{getUserDisplayName(profile)} {session.session_id === this.props.currentSession?.session_id && formatMessage({defaultMessage: '(you)'})}
</span>

<div
Expand Down

0 comments on commit a200fc6

Please sign in to comment.