From 5bbb980250d397738231b9f3b4a3813c808ec4ac Mon Sep 17 00:00:00 2001
From: Paul Frazee <pfrazee@gmail.com>
Date: Tue, 14 Mar 2023 14:36:31 -0500
Subject: Fix mentions in web

---
 src/view/com/composer/text-input/TextInput.web.tsx | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(limited to 'src/view/com/composer/text-input/TextInput.web.tsx')

diff --git a/src/view/com/composer/text-input/TextInput.web.tsx b/src/view/com/composer/text-input/TextInput.web.tsx
index 67ef836a0..4b23e891b 100644
--- a/src/view/com/composer/text-input/TextInput.web.tsx
+++ b/src/view/com/composer/text-input/TextInput.web.tsx
@@ -66,6 +66,7 @@ export const TextInput = React.forwardRef(
       injectCSS: true,
       onUpdate({editor: editorProp}) {
         const json = editorProp.getJSON()
+
         const newText = editorJsonToText(json).trim()
         onTextChanged(newText)
 
@@ -101,7 +102,7 @@ function editorJsonToText(json: JSONContent): string {
   } else if (json.type === 'text') {
     text += json.text || ''
   } else if (json.type === 'mention') {
-    text += json.attrs?.id || ''
+    text += `@${json.attrs?.id || ''}`
   }
   return text
 }
-- 
cgit 1.4.1

