@@ -568,12 +568,12 @@ export default class TextualBody extends React.Component<IBodyProps, IState> {
568
568
let body : ReactNode ;
569
569
const client = MatrixClientPeg . get ( ) ;
570
570
const room = client . getRoom ( mxEvent . getRoomId ( ) ) ;
571
- let emotesEvent = room . currentState . getStateEvents ( "m.room.emotes" , "" ) ;
572
- let rawEmotes = emotesEvent ? ( emotesEvent . getContent ( ) || { } ) : { } ;
573
- let finalEmotes = { } ;
574
- for ( let key in rawEmotes ) {
575
- finalEmotes [ ":" + key + ":" ] = "<img class='mx_Emote' src=" + mediaFromMxc ( rawEmotes [ key ] ) . srcHttp + "/>" ;
576
- }
571
+ let emotesEvent = room . currentState . getStateEvents ( "m.room.emotes" , "" ) ;
572
+ let rawEmotes = emotesEvent ? ( emotesEvent . getContent ( ) || { } ) : { } ;
573
+ let finalEmotes = { } ;
574
+ for ( let key in rawEmotes ) {
575
+ finalEmotes [ ":" + key + ":" ] = "<img class='mx_Emote' title=':" + key + ":' src=" + mediaFromMxc ( rawEmotes [ key ] ) . srcHttp + "/>" ;
576
+ }
577
577
if ( SettingsStore . isEnabled ( "feature_extensible_events" ) ) {
578
578
const extev = this . props . mxEvent . unstableExtensibleEvent as MessageEvent ;
579
579
if ( extev ?. isEquivalentTo ( M_MESSAGE ) ) {
@@ -598,14 +598,14 @@ export default class TextualBody extends React.Component<IBodyProps, IState> {
598
598
if ( ! body ) {
599
599
isEmote = content . msgtype === MsgType . Emote ;
600
600
isNotice = content . msgtype === MsgType . Notice ;
601
- body = ( HtmlUtils . bodyToHtml ( content , this . props . highlights , {
601
+ body = HtmlUtils . bodyToHtml ( content , this . props . highlights , {
602
602
disableBigEmoji : isEmote
603
603
|| ! SettingsStore . getValue < boolean > ( 'TextualBody.enableBigEmoji' ) ,
604
604
// Part of Replies fallback support
605
605
stripReplyFallback : stripReply ,
606
606
ref : this . contentRef ,
607
607
returnString : false ,
608
- } ) as any ) . replace ( / : [ \w + - ] + : / , m => finalEmotes [ m ] ? finalEmotes [ m ] : m ) ;
608
+ } ) ;
609
609
610
610
}
611
611
//console.log(body);
0 commit comments