diff --git a/src/editor/parts.ts b/src/editor/parts.ts index b69f255f89..6e3f35371d 100644 --- a/src/editor/parts.ts +++ b/src/editor/parts.ts @@ -34,7 +34,7 @@ interface ISerializedPart { interface ISerializedPillPart { type: Type.AtRoomPill | Type.RoomPill | Type.UserPill; text: string; - resourceId: string; + resourceId?: string; } export type SerializedPart = ISerializedPart | ISerializedPillPart; @@ -374,6 +374,13 @@ class AtRoomPillPart extends RoomPillPart { get type(): IPillPart["type"] { return Type.AtRoomPill; } + + serialize(): ISerializedPillPart { + return { + type: this.type, + text: this.text, + }; + } } class UserPillPart extends PillPart {