@ -1062,6 +1062,8 @@ export class Message extends React.PureComponent<Props, State> {
selected ,
selected ,
multiSelectMode ,
multiSelectMode ,
conversationType ,
conversationType ,
isPublic ,
text ,
} = this . props ;
} = this . props ;
const { expired , expiring } = this . state ;
const { expired , expiring } = this . state ;
@ -1084,15 +1086,15 @@ export class Message extends React.PureComponent<Props, State> {
// We parse the message later, but we still need to do an early check
// 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
// to see if the message mentions us, so we can display the entire
// message differently
// message differently
const mentions = this . props . text
const mentions = text
? this . props . text . match ( window . pubkeyPattern )
? text . match ( window . pubkeyPattern )
: [ ] ;
: [ ] ;
const mentionMe =
const mentionMe =
mentions &&
mentions &&
mentions . some ( m = > m . slice ( 1 ) === window . lokiPublicChatAPI . ourKey ) ;
mentions . some ( m = > m . slice ( 1 ) === window . lokiPublicChatAPI . ourKey ) ;
const isIncoming = direction === 'incoming' ;
const isIncoming = direction === 'incoming' ;
const shouldHightlight = mentionMe && isIncoming && this . props . isPublic ;
const shouldHightlight = mentionMe && isIncoming && isPublic ;
const divClasses = [ 'loki-message-wrapper' ] ;
const divClasses = [ 'loki-message-wrapper' ] ;
if ( shouldHightlight ) {
if ( shouldHightlight ) {