From d9097ccd40f88f5645f1535714ba912b59183032 Mon Sep 17 00:00:00 2001 From: 7w1 Date: Sun, 28 Jun 2026 17:15:31 -0500 Subject: [PATCH 1/2] potential fix --- src/app/components/editor/output.ts | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/src/app/components/editor/output.ts b/src/app/components/editor/output.ts index d8be87e30e..6c36659259 100644 --- a/src/app/components/editor/output.ts +++ b/src/app/components/editor/output.ts @@ -74,11 +74,11 @@ const elementToCustomHtml = ( return sanitizeText(matrixTo); } case BlockType.Emoticon: - return node.key.startsWith('mxc://') + return node.key?.startsWith('mxc://') ? `${sanitizeText(
             node.shortcode
           )}` - : sanitizeText(node.key); + : sanitizeText(node.key ?? ''); case BlockType.Link: return testMatrixTo(node.href) ? sanitizeText(node.href) @@ -111,10 +111,9 @@ export const toMatrixCustomHTML = ( // strip nicknames if needed if (opts.stripNickname && opts.nickNameReplacement) { - opts.nickNameReplacement?.keys().forEach((key) => { - const replacement = opts.nickNameReplacement!.get(key) ?? ''; + for (const [key, replacement] of opts.nickNameReplacement) { line = line.replaceAll(key, replacement); - }); + } } markdownLines += line; if (index === targetNodes.length - 1) { @@ -145,7 +144,7 @@ const elementToPlainText = (node: CustomElement, children: string): string => { case BlockType.Mention: return node.name === '@room' ? node.name : node.id; case BlockType.Emoticon: - return node.key.startsWith('mxc://') ? `:${node.shortcode}:` : node.key; + return node.key?.startsWith('mxc://') ? `:${node.shortcode}:` : (node.key ?? ''); case BlockType.Link: return `[${children}](${node.href})`; case BlockType.Command: @@ -182,10 +181,9 @@ export const toPlainText = ( text = text.replaceAll(SPOILEREDLINKINPUTREGEX, '$1'); if (stripNickname && nickNameReplacement) { - nickNameReplacement?.keys().forEach((key) => { - const replacement = nickNameReplacement.get(key) ?? ''; + for (const [key, replacement] of nickNameReplacement) { text = text.replaceAll(key, replacement); - }); + } } return text; } @@ -211,7 +209,7 @@ export const toRawText = (node: Descendant | Descendant[]): string => { case BlockType.Link: return `[${children}](${node.href})`; case BlockType.Emoticon: - return node.key.startsWith('mxc://') ? `:${node.shortcode}:` : node.key; + return node.key?.startsWith('mxc://') ? `:${node.shortcode}:` : (node.key ?? ''); case BlockType.Mention: return node.name === '@room' ? node.name : node.id; case BlockType.Command: From 57a9a93a0063f4e1ca216b9516345a40d1d39312 Mon Sep 17 00:00:00 2001 From: 7w1 Date: Wed, 1 Jul 2026 21:34:30 -0500 Subject: [PATCH 2/2] changeset --- .changeset/fix-sending-firefox-apple.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/fix-sending-firefox-apple.md diff --git a/.changeset/fix-sending-firefox-apple.md b/.changeset/fix-sending-firefox-apple.md new file mode 100644 index 0000000000..042ede52b9 --- /dev/null +++ b/.changeset/fix-sending-firefox-apple.md @@ -0,0 +1,5 @@ +--- +default: patch +--- + +Fixed outdated Firefox versions and some Safari versions not being able to send messages.