From adb325b3bd9bcd889e25c2ed4de828aabd562bc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Mon, 13 Sep 2021 18:05:59 +0200 Subject: [PATCH] Use enums MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Šimon Brandner --- src/components/views/dialogs/MessageEditHistoryDialog.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/views/dialogs/MessageEditHistoryDialog.tsx b/src/components/views/dialogs/MessageEditHistoryDialog.tsx index 04313ed9a0..427924e445 100644 --- a/src/components/views/dialogs/MessageEditHistoryDialog.tsx +++ b/src/components/views/dialogs/MessageEditHistoryDialog.tsx @@ -27,6 +27,7 @@ import Spinner from "../elements/Spinner"; import EditHistoryMessage from "../messages/EditHistoryMessage"; import DateSeparator from "../messages/DateSeparator"; import { IDialogProps } from "./IDialogProps"; +import { EventType, RelationType } from "matrix-js-sdk/src/@types/event"; interface IProps extends IDialogProps { mxEvent: MatrixEvent; @@ -72,7 +73,7 @@ export default class MessageEditHistoryDialog extends React.PureComponent((_resolve, _reject) => {resolve = _resolve; reject = _reject;}); try { result = await client.relations( - roomId, eventId, "m.replace", "m.room.message", opts); + roomId, eventId, RelationType.Replace, EventType.RoomMessage, opts); } catch (error) { // log if the server returned an error if (error.errcode) {