Page MenuHomePhabricator

D8944.id31255.diff
No OneTemporary

D8944.id31255.diff

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(
- `(?<textPrefix>(?:^(?:.|\n)*\\s+)|^)@(?<username>${oldValidUsernameRegexString})?$`,
+ `(?<textPrefix>(?:^(?:.|\n)*\\s+)|^)@(?<mentionText>${validChatNameRegexString})?$`,
);
export type TooltipPosition = {

File Metadata

Mime Type
text/plain
Expires
Sun, Nov 24, 3:40 AM (17 h, 26 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2573736
Default Alt Text
D8944.id31255.diff (1 KB)

Event Timeline