diff --git a/web/chat/chat-input-bar.react.js b/web/chat/chat-input-bar.react.js --- a/web/chat/chat-input-bar.react.js +++ b/web/chat/chat-input-bar.react.js @@ -608,7 +608,7 @@ ? { textBeforeAtSymbol: typeaheadRegexMatches.groups?.textPrefix ?? '', - query: typeaheadRegexMatches.groups?.username ?? '', + query: typeaheadRegexMatches.groups?.mentionText ?? '', } : null, [typeaheadRegexMatches], diff --git a/web/utils/typeahead-utils.js b/web/utils/typeahead-utils.js --- a/web/utils/typeahead-utils.js +++ b/web/utils/typeahead-utils.js @@ -3,12 +3,12 @@ import classNames from 'classnames'; import * as React from 'react'; -import { oldValidUsernameRegexString } from 'lib/shared/account-utils.js'; import { getNewTextAndSelection, type MentionTypeaheadSuggestionItem, type TypeaheadTooltipActionItem, } from 'lib/shared/mention-utils.js'; +import { validChatNameRegexString } from 'lib/shared/thread-utils.js'; import { stringForUserExplicit } from 'lib/shared/user-utils.js'; import type { SetState } from 'lib/types/hook-types.js'; @@ -18,7 +18,7 @@ import Button from '../components/button.react.js'; const webMentionTypeaheadRegex: RegExp = new RegExp( - `(?(?:^(?:.|\n)*\\s+)|^)@(?${oldValidUsernameRegexString})?$`, + `(?(?:^(?:.|\n)*\\s+)|^)@(?${validChatNameRegexString})?$`, ); export type TooltipPosition = {