Rework MentionNode to take a whole Mention entity

This commit is contained in:
Alex Gleason
2023-10-13 22:14:55 -05:00
parent 70dc4caeb9
commit e0c11fbfd1
2 changed files with 14 additions and 16 deletions

View File

@ -327,8 +327,8 @@ const AutosuggestPlugin = ({
node.setTextContent(`${suggestion} `);
node.select();
} else {
const acct = selectAccount(getState(), suggestion)!.acct;
replaceMatch($createMentionNode(acct));
const account = selectAccount(getState(), suggestion)!;
replaceMatch($createMentionNode(account));
}
dispatch(clearComposeSuggestions(composeId));