Replace hardcoded strings with MsgType constants (#10604)
* replace hardcoded strings with MsgType constants * fix import and revert comments Signed-off-by: Ken Wu kenqiwu@gmail.com * fix import Signed-off-by: Ken Wu kenqiwu@gmail.com --------- Signed-off-by: Ken Wu kenqiwu@gmail.com
This commit is contained in:
@@ -17,6 +17,7 @@ limitations under the License.
|
||||
import React, { createRef } from "react";
|
||||
import { EventStatus, IContent, MatrixEvent, MatrixEventEvent } from "matrix-js-sdk/src/models/event";
|
||||
import classNames from "classnames";
|
||||
import { MsgType } from "matrix-js-sdk/src/@types/event";
|
||||
|
||||
import * as HtmlUtils from "../../../HtmlUtils";
|
||||
import { editBodyDiffToHtml } from "../../../utils/MessageDiffUtils";
|
||||
@@ -166,7 +167,7 @@ export default class EditHistoryMessage extends React.PureComponent<IProps, ISta
|
||||
returnString: false,
|
||||
});
|
||||
}
|
||||
if (mxEvent.getContent().msgtype === "m.emote") {
|
||||
if (mxEvent.getContent().msgtype === MsgType.Emote) {
|
||||
const name = mxEvent.sender ? mxEvent.sender.name : mxEvent.getSender();
|
||||
contentContainer = (
|
||||
<div className="mx_EventTile_content" ref={this.content}>
|
||||
|
||||
Reference in New Issue
Block a user