@@ -18,7 +18,7 @@ import React, { createRef, KeyboardEvent, ReactNode, TransitionEvent } from 'rea
18
18
import ReactDOM from 'react-dom' ;
19
19
import classNames from 'classnames' ;
20
20
import { Room } from 'matrix-js-sdk/src/models/room' ;
21
- import { EventType , MsgType } from 'matrix-js-sdk/src/@types/event' ;
21
+ import { EventType } from 'matrix-js-sdk/src/@types/event' ;
22
22
import { MatrixEvent } from 'matrix-js-sdk/src/models/event' ;
23
23
import { Relations } from "matrix-js-sdk/src/models/relations" ;
24
24
import { logger } from 'matrix-js-sdk/src/logger' ;
@@ -58,9 +58,6 @@ import { IReadReceiptInfo } from "../views/rooms/ReadReceiptMarker";
58
58
import { haveRendererForEvent } from "../../events/EventTileFactory" ;
59
59
import { editorRoomKey } from "../../Editing" ;
60
60
import { hasThreadSummary } from "../../utils/EventUtils" ;
61
- import { mediaFromMxc } from "../../customisations/Media" ;
62
- import { mockStateEventImplementation } from '../../../test/test-utils' ;
63
-
64
61
65
62
const CONTINUATION_MAX_INTERVAL = 5 * 60 * 1000 ; // 5 minutes
66
63
const continuedTypes = [ EventType . Sticker , EventType . RoomMessage ] ;
@@ -289,12 +286,6 @@ export default class MessagePanel extends React.Component<IProps, IState> {
289
286
this . showTypingNotificationsWatcherRef =
290
287
SettingsStore . watchSetting ( "showTypingNotifications" , null , this . onShowTypingNotificationsChange ) ;
291
288
292
- let emotesEvent = this . props . room . currentState . getStateEvents ( "m.room.emotes" , "" ) ;
293
- let rawEmotes = emotesEvent ? ( emotesEvent . getContent ( ) || { } ) : { } ;
294
- let finalEmotes = { } ;
295
- for ( let key in rawEmotes ) {
296
- this . state . emotes [ ":" + key + ":" ] = "<img src=" + mediaFromMxc ( rawEmotes [ key ] ) . srcHttp + "/>" ;
297
- }
298
289
299
290
}
300
291
@@ -784,45 +775,6 @@ export default class MessagePanel extends React.Component<IProps, IState> {
784
775
const callEventGrouper = this . props . callEventGroupers . get ( mxEv . getContent ( ) . call_id ) ;
785
776
786
777
// use txnId as key if available so that we don't remount during sending
787
- if ( mxEv . getType ( ) === "m.room.message" ) {
788
- let messageText = mxEv . getContent ( ) . body ;
789
- //console.log(messageText);
790
- let editedMessageText = messageText . replace ( / : [ \w + - ] + : / , m => this . state . emotes [ m ] ? this . state . emotes [ m ] : m ) ;
791
- let m = [ { body :messageText ,
792
- mimetype :"text/plain" ,
793
- } ,
794
- {
795
- body :editedMessageText ,
796
- mimetype :"text/html" ,
797
- }
798
- ] ;
799
- // if(mxEv.clearEvent){
800
- // console.log("clearevent",mxEv.getRoomId());
801
- // mxEv.clearEvent.content={
802
- // "format":"org.matrix.custom.html",
803
- // "formatted_body":editedMessageText,
804
- // "body":messageText,
805
- // "msgtype":"m.text",
806
- // "org.matrix.msc1767.message":m
807
- // }
808
- // }
809
- // else{
810
- // console.log("no clearevent",mxEv);
811
- // mxEv.content={
812
- // "format":"org.matrix.custom.html",
813
- // "formatted_body":editedMessageText,
814
- // "body":messageText,
815
- // "msgtype":"m.text",
816
- // "org.matrix.msc1767.message":m
817
- // }
818
- // }
819
-
820
- //mxEv.getContent().formatted_body = messageText;
821
- //mxEv.clearEvent.content["org.matrix.msc1767.text"] = "";
822
- //mxEv.getContent().formatted_body = (<span>hi</span>);
823
- //mxEv.getContent().format = "org.matrix.custom.html";
824
-
825
- }
826
778
ret . push (
827
779
< EventTile
828
780
key = { mxEv . getTxnId ( ) || eventId }
0 commit comments