From 3e6372b3d49ab9b0220c88aa0cc044e5ceaef9de Mon Sep 17 00:00:00 2001 From: Joram Wilander Date: Tue, 4 Apr 2017 15:20:55 -0400 Subject: Fix title in RHS for pinned posts (#5976) --- webapp/components/sidebar_right.jsx | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/webapp/components/sidebar_right.jsx b/webapp/components/sidebar_right.jsx index 6a0716ce1..3f3bacb05 100644 --- a/webapp/components/sidebar_right.jsx +++ b/webapp/components/sidebar_right.jsx @@ -196,6 +196,17 @@ export default class SidebarRight extends React.Component { searchForm = ; } + const channel = this.props.channel; + + let channelDisplayName = ''; + if (channel) { + if (channel.type === Constants.DM_CHANNEL || channel.type === Constants.GM_CHANNEL) { + channelDisplayName = Utils.localizeMessage('rhs_root.direct', 'Direct Message'); + } else { + channelDisplayName = channel.display_name; + } + } + if (this.state.searchVisible) { content = (
@@ -207,7 +218,7 @@ export default class SidebarRight extends React.Component { useMilitaryTime={this.state.useMilitaryTime} toggleSize={this.toggleSize} shrink={this.onShrink} - channelDisplayName={this.props.channel ? this.props.channel.display_name : ''} + channelDisplayName={channelDisplayName} />
); -- cgit v1.2.3-1-g7c22