diff --git a/src/components/compose.jsx b/src/components/compose.jsx index b926a98a..0f4efcc2 100644 --- a/src/components/compose.jsx +++ b/src/components/compose.jsx @@ -89,10 +89,15 @@ function Compose({ spoilerTextRef.current.value = spoilerText; spoilerTextRef.current.focus(); } else { + const mentions = new Set([ + replyToStatus.account.acct, + ...replyToStatus.mentions.map((m) => m.acct), + ]); + textareaRef.current.value = `${[...mentions] + .filter((m) => m !== currentAccountInfo.acct) // Excluding self + .map((m) => `@${m}`) + .join(' ')} `; textareaRef.current.focus(); - if (replyToStatus.account.id !== currentAccount) { - textareaRef.current.value = `@${replyToStatus.account.acct} `; - } } setVisibility(visibility); setSensitive(sensitive);