EventType enum!

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
pull/21833/head
Šimon Brandner 2021-07-13 09:23:57 +02:00
parent 931bba747a
commit 63ad95246a
No known key found for this signature in database
GPG Key ID: 9760693FDD98A790
1 changed files with 6 additions and 3 deletions

View File

@ -26,6 +26,7 @@ import SenderProfile from "../messages/SenderProfile";
import TextualBody from "../messages/TextualBody"; import TextualBody from "../messages/TextualBody";
import MImageReplyBody from "../messages/MImageReplyBody"; import MImageReplyBody from "../messages/MImageReplyBody";
import * as sdk from '../../../index'; import * as sdk from '../../../index';
import { EventType } from 'matrix-js-sdk/src/@types/event';
interface IProps { interface IProps {
mxEvent: MatrixEvent; mxEvent: MatrixEvent;
@ -78,9 +79,11 @@ export default class ReplyTile extends React.PureComponent<IProps> {
const eventType = this.props.mxEvent.getType(); const eventType = this.props.mxEvent.getType();
// Info messages are basically information about commands processed on a room // Info messages are basically information about commands processed on a room
let isInfoMessage = ( let isInfoMessage = [
eventType !== 'm.room.message' && eventType !== 'm.sticker' && eventType !== 'm.room.create' EventType.RoomMessage,
); EventType.Sticker,
EventType.RoomCreate,
].includes(eventType as EventType);
let tileHandler = getHandlerTile(this.props.mxEvent); let tileHandler = getHandlerTile(this.props.mxEvent);
// If we're showing hidden events in the timeline, we should use the // If we're showing hidden events in the timeline, we should use the