Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 62fa60f

Browse files
committed
Use resourceId in formatted body
Signed-off-by: Šimon Brandner <[email protected]>
1 parent 0343a33 commit 62fa60f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/editor/serialize.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ export function mdSerialize(model: EditorModel) {
3434
case "at-room-pill":
3535
return html + part.text;
3636
case "room-pill":
37+
// Here we use the resourceId for compatibility with non-rich text clients
38+
// See https://github.com/vector-im/element-web/issues/16660
39+
return html +
40+
`[${part.resourceId.replace(/[[\\\]]/g, c => "\\" + c)}](${makeGenericPermalink(part.resourceId)})`;
3741
case "user-pill":
3842
return html +
3943
`[${part.text.replace(/[[\\\]]/g, c => "\\" + c)}](${makeGenericPermalink(part.resourceId)})`;

0 commit comments

Comments
 (0)