From afd33f4b77354e4f261cf5b7fcde2b7ca814a365 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Wed, 12 May 2021 12:19:05 +0200 Subject: [PATCH] use constant for member event type --- src/matrix/room/ArchivedRoom.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/matrix/room/ArchivedRoom.js b/src/matrix/room/ArchivedRoom.js index fa95270b..553f5a60 100644 --- a/src/matrix/room/ArchivedRoom.js +++ b/src/matrix/room/ArchivedRoom.js @@ -16,7 +16,7 @@ limitations under the License. import {reduceStateEvents} from "./RoomSummary.js"; import {BaseRoom} from "./BaseRoom.js"; -import {RoomMember} from "./members/RoomMember.js"; +import {RoomMember, EVENT_TYPE as MEMBER_EVENT_TYPE} from "./members/RoomMember.js"; export class ArchivedRoom extends BaseRoom { constructor(options) { @@ -133,7 +133,7 @@ export class ArchivedRoom extends BaseRoom { function findKickDetails(roomResponse, ownUserId) { const kickEvent = reduceStateEvents(roomResponse, (kickEvent, event) => { - if (event.type === "m.room.member") { + if (event.type === MEMBER_EVENT_TYPE) { // did we get kicked? if (event.state_key === ownUserId && event.sender !== event.state_key) { kickEvent = event;