Skip to content
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.

Commit

Permalink
display BAR_ANNOUNCEMENT_TYPE with Markdown parser (#6981)
Browse files Browse the repository at this point in the history
* display BAR_ANNOUNCEMENT_TYPE with Markdown parser

* fix code style
  • Loading branch information
csduarte authored and jwilander committed Jul 19, 2017
1 parent 533bd6d commit 91256f3
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion components/announcement_bar/announcement_bar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import * as AdminActions from 'actions/admin_actions.jsx';
import {ErrorBarTypes, StatTypes} from 'utils/constants.jsx';
import {isLicenseExpiring, isLicenseExpired, isLicensePastGracePeriod, displayExpiryDate} from 'utils/license_utils.jsx';
import * as Utils from 'utils/utils.jsx';
import * as TextFormatting from 'utils/text_formatting.jsx';

const RENEWAL_LINK = 'https://licensing.mattermost.com/renew';

Expand Down Expand Up @@ -219,7 +220,13 @@ export default class AnnouncementBar extends React.PureComponent {
const renewalLink = RENEWAL_LINK + '?id=' + global.window.mm_license.Id + '&user_count=' + this.state.totalUsers;

let message = this.state.message;
if (message === ErrorBarTypes.PREVIEW_MODE) {
if (this.state.type === BAR_ANNOUNCEMENT_TYPE) {
message = (
<span
dangerouslySetInnerHTML={{__html: TextFormatting.formatText(message, {singleline: true, mentionHighlight: false})}}
/>
);
} else if (message === ErrorBarTypes.PREVIEW_MODE) {
message = (
<FormattedMessage
id={ErrorBarTypes.PREVIEW_MODE}
Expand Down

0 comments on commit 91256f3

Please sign in to comment.