From ee8d688de1819653cf1b69e917776bbb27858589 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Sat, 1 May 2021 10:59:28 +0200 Subject: [PATCH] Fix saving room pill part to history MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Šimon Brandner --- src/editor/parts.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/editor/parts.ts b/src/editor/parts.ts index 02c5d64895..b69f255f89 100644 --- a/src/editor/parts.ts +++ b/src/editor/parts.ts @@ -287,6 +287,14 @@ abstract class PillPart extends BasePart implements IPillPart { } } + serialize(): ISerializedPillPart { + return { + type: this.type, + text: this.text, + resourceId: this.resourceId, + }; + } + get canEdit() { return false; } @@ -394,14 +402,6 @@ class UserPillPart extends PillPart { get className() { return "mx_UserPill mx_Pill"; } - - serialize(): ISerializedPillPart { - return { - type: this.type, - text: this.text, - resourceId: this.resourceId, - }; - } } class PillCandidatePart extends PlainBasePart implements IPillCandidatePart { @@ -495,7 +495,7 @@ export class PartCreator { case Type.PillCandidate: return this.pillCandidate(part.text); case Type.RoomPill: - return this.roomPill(part.text); + return this.roomPill(part.resourceId); case Type.UserPill: return this.userPill(part.text, part.resourceId); }