Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3351804
D8944.id31255.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D8944.id31255.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D8944: [web] Modify mention typeahead regex
Attached
Detach File
Event Timeline
Log In to Comment