diff --git a/ts/components/conversation/Message.tsx b/ts/components/conversation/Message.tsx index 16b7700c8..ccb45dbeb 100644 --- a/ts/components/conversation/Message.tsx +++ b/ts/components/conversation/Message.tsx @@ -1062,6 +1062,8 @@ export class Message extends React.PureComponent { selected, multiSelectMode, conversationType, + isPublic, + text, } = this.props; const { expired, expiring } = this.state; @@ -1084,15 +1086,15 @@ export class Message extends React.PureComponent { // We parse the message later, but we still need to do an early check // to see if the message mentions us, so we can display the entire // message differently - const mentions = this.props.text - ? this.props.text.match(window.pubkeyPattern) + const mentions = text + ? text.match(window.pubkeyPattern) : []; const mentionMe = mentions && mentions.some(m => m.slice(1) === window.lokiPublicChatAPI.ourKey); const isIncoming = direction === 'incoming'; - const shouldHightlight = mentionMe && isIncoming && this.props.isPublic; + const shouldHightlight = mentionMe && isIncoming && isPublic; const divClasses = ['loki-message-wrapper']; if (shouldHightlight) {