Parses text from the content of a ticket to add links to mentioned tickets
This commit is contained in:
parent
e8c1ffeea7
commit
b56ff24a7d
|
@ -7,6 +7,7 @@ import AdminDataActions from 'actions/admin-data-actions';
|
||||||
import i18n from 'lib-app/i18n';
|
import i18n from 'lib-app/i18n';
|
||||||
import API from 'lib-app/api-call';
|
import API from 'lib-app/api-call';
|
||||||
import SessionStore from 'lib-app/session-store';
|
import SessionStore from 'lib-app/session-store';
|
||||||
|
import MentionsParser from 'lib-app/mentions-parser';
|
||||||
|
|
||||||
import TicketEvent from 'app-components/ticket-event';
|
import TicketEvent from 'app-components/ticket-event';
|
||||||
import AreYouSure from 'app-components/are-you-sure';
|
import AreYouSure from 'app-components/are-you-sure';
|
||||||
|
@ -73,7 +74,7 @@ class TicketViewer extends React.Component {
|
||||||
</div>
|
</div>
|
||||||
{this.props.editable ? this.renderEditableHeaders() : this.renderHeaders()}
|
{this.props.editable ? this.renderEditableHeaders() : this.renderHeaders()}
|
||||||
<div className="ticket-viewer__content">
|
<div className="ticket-viewer__content">
|
||||||
<TicketEvent type="COMMENT" author={ticket.author} content={ticket.content} date={ticket.date} file={ticket.file}/>
|
<TicketEvent type="COMMENT" author={ticket.author} content={this.props.userStaff ? MentionsParser.parse(ticket.content) : ticket.content} date={ticket.date} file={ticket.file}/>
|
||||||
</div>
|
</div>
|
||||||
<div className="ticket-viewer__comments">
|
<div className="ticket-viewer__comments">
|
||||||
{ticket.events && ticket.events.map(this.renderTicketEvent.bind(this))}
|
{ticket.events && ticket.events.map(this.renderTicketEvent.bind(this))}
|
||||||
|
|
Loading…
Reference in New Issue